PaymentSchedule.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Database\Eloquent\Model;
  5. use Illuminate\Database\Eloquent\Relations\BelongsTo;
  6. /**
  7. * @property int $id
  8. * @property int $payment_id
  9. * @property int $schedule_id
  10. * @property \Illuminate\Support\Carbon|null $created_at
  11. * @property \Illuminate\Support\Carbon|null $updated_at
  12. * @property-read \App\Models\Payment $payment
  13. * @property-read \App\Models\Schedule $schedule
  14. * @method static \Illuminate\Database\Eloquent\Builder<static>|PaymentSchedule newModelQuery()
  15. * @method static \Illuminate\Database\Eloquent\Builder<static>|PaymentSchedule newQuery()
  16. * @method static \Illuminate\Database\Eloquent\Builder<static>|PaymentSchedule query()
  17. * @method static \Illuminate\Database\Eloquent\Builder<static>|PaymentSchedule whereCreatedAt($value)
  18. * @method static \Illuminate\Database\Eloquent\Builder<static>|PaymentSchedule whereId($value)
  19. * @method static \Illuminate\Database\Eloquent\Builder<static>|PaymentSchedule wherePaymentId($value)
  20. * @method static \Illuminate\Database\Eloquent\Builder<static>|PaymentSchedule whereScheduleId($value)
  21. * @method static \Illuminate\Database\Eloquent\Builder<static>|PaymentSchedule whereUpdatedAt($value)
  22. * @mixin \Eloquent
  23. */
  24. class PaymentSchedule extends Model
  25. {
  26. use HasFactory;
  27. protected $table = 'payment_schedules';
  28. protected $fillable = [
  29. 'payment_id',
  30. 'schedule_id',
  31. ];
  32. protected $casts = [
  33. 'created_at' => 'datetime',
  34. 'updated_at' => 'datetime',
  35. ];
  36. public function payment(): BelongsTo
  37. {
  38. return $this->belongsTo(Payment::class);
  39. }
  40. public function schedule(): BelongsTo
  41. {
  42. return $this->belongsTo(Schedule::class);
  43. }
  44. }