<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Concerns\HasUuids;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Settlement extends Model
{
    use HasUuids, HasFactory;

    protected $guarded = [];

    protected $casts = [
        'temp_value' => 'decimal:2',
        'final_value' => 'decimal:2',
        'difference' => 'decimal:2',
        'issue_date' => 'date',
    ];

    public function product()
    {
        return $this->belongsTo(Product::class);
    }
}
