update profile & produktivitas
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Pertanian;
|
||||
|
||||
use App\Models\Profile;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Kualitas extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'kualitas';
|
||||
|
||||
protected $fillable = [
|
||||
'produksi_id',
|
||||
'profile_id',
|
||||
'lahan_id',
|
||||
'komoditas_id',
|
||||
'tanggal_pemeriksaan',
|
||||
'grade',
|
||||
'kadar_air',
|
||||
'berat_bersih',
|
||||
'berat_rusak',
|
||||
'persentase_kerusakan',
|
||||
'standar_mutu',
|
||||
'status_kelayakan',
|
||||
'pemeriksa',
|
||||
'catatan',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
'deleted_by',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'tanggal_pemeriksaan' => 'date',
|
||||
];
|
||||
|
||||
public function produksi()
|
||||
{
|
||||
return $this->belongsTo(Produksi::class, 'produksi_id');
|
||||
}
|
||||
|
||||
public function profile()
|
||||
{
|
||||
return $this->belongsTo(Profile::class, 'profile_id');
|
||||
}
|
||||
|
||||
public function lahan()
|
||||
{
|
||||
return $this->belongsTo(Lahan::class, 'lahan_id');
|
||||
}
|
||||
|
||||
public function komoditas()
|
||||
{
|
||||
return $this->belongsTo(Komoditas::class, 'komoditas_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user