<?php

namespace App\Models;

use App\Models\Concerns\BelongsToCompany;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class PrePayment extends Model
{
    use BelongsToCompany;

    protected $table = 'pre_payments';

    protected $fillable = [
        'company_id', 'user_id', 'amount', 'month', 'year', 'status', 'notes',
    ];

    protected $casts = [
        'amount' => 'decimal:2',
    ];

    public function user(): BelongsTo
    {
        return $this->belongsTo(User::class);
    }
}
