<?php

namespace App\Models;

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

class FormDaily43 extends Model
{
    use HasFactory;

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

    protected $fillable = [
        'id_farm_section',
        'created_by',
        'tarikh_beli_guna',
        'jenis_bahan',
        'formulasi',
        'pembelian_kuantiti',
        'pembelian_harga',
        'pembelian_nama_pembekal',
        'penggunaan_kuantiti',
        'penggunaan_caraAplikasi',
        'penggunaan_lokasi',
        'penggunaan_keluasan',
        'nama_operator',
    ];

    // 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');
    }
}
