| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- namespace App\Models;
- use Illuminate\Database\Eloquent\Factories\HasFactory;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Database\Eloquent\Relations\BelongsTo;
- /**
- * @property-read \App\Models\Payment|null $payment
- * @property-read \App\Models\Schedule|null $schedule
- * @method static \Illuminate\Database\Eloquent\Builder<static>|PaymentSchedule newModelQuery()
- * @method static \Illuminate\Database\Eloquent\Builder<static>|PaymentSchedule newQuery()
- * @method static \Illuminate\Database\Eloquent\Builder<static>|PaymentSchedule query()
- * @mixin \Eloquent
- */
- class PaymentSchedule extends Model
- {
- use HasFactory;
- protected $table = 'payment_schedules';
- protected $fillable = [
- 'payment_id',
- 'schedule_id',
- ];
- protected $casts = [
- 'created_at' => 'datetime',
- 'updated_at' => 'datetime',
- ];
- public function payment(): BelongsTo
- {
- return $this->belongsTo(Payment::class);
- }
- public function schedule(): BelongsTo
- {
- return $this->belongsTo(Schedule::class);
- }
- }
|