<?php

namespace App\Models;

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

class FormDaily45 extends Model
{
    use HasFactory;

    protected $table = 'form_daily_4_5'; // Specify the table name

    protected $fillable = [
        'id_farm_section',
        'created_by',
        'tanaman',
        'lokasi_keluasan',
        'nama_dagangan_bahan_aktif',
        'no_LRMP',
        'harga',
        'kuantiti_pembelian_kadar_penggunaan',
        'Justifikasi_penggunaan',
        'alat_digunakan',
        'PHI_hari',
        'REI_hari',
    ];

    // Define relationships if necessary
    public function farmSection()
    {
        return $this->belongsTo(Farm_section::class, 'id_farm_section');
    }

    public function createdBy()
    {
        return $this->belongsTo(Login::class, 'created_by');
    }
}
