<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class DailySalePayment extends Model
{
    protected $fillable = [
        'daily_sale_id',
        'payment_method_id',
        'amount',
        'reference'
    ];

    protected $casts = [
        'amount' => 'decimal:2',
    ];

    public function dailySale(): BelongsTo
    {
        return $this->belongsTo(DailySale::class);
    }

    public function paymentMethod(): BelongsTo
    {
        return $this->belongsTo(PaymentMethod::class);
    }
}
