<?php

namespace App\Models;

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

class FinanceHarvestEntry extends Model
{
    use HasFactory;

    protected $table = 'finance_harvest_entries';

    public $incrementing = false;

    protected $keyType = 'string';

    protected $fillable = [
        'id',
        'user_id',
        'date',
        'batch_id',
        'kg_harvested',
        'kg_adjustment_loss',
        'loss_reason',
        'notes',
        'created_at_client',
        'updated_at_client',
    ];

    protected $casts = [
        'date' => 'date:Y-m-d',
        'kg_harvested' => 'float',
        'kg_adjustment_loss' => 'float',
        'created_at_client' => 'datetime',
        'updated_at_client' => 'datetime',
    ];
}
