akses pasar
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Pertanian;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Models\User;
|
||||
use App\Models\Pertanian\Petani;
|
||||
|
||||
class HargaJualPanen extends Model
|
||||
{
|
||||
protected $table = 'harga_jual_panen';
|
||||
|
||||
protected $fillable = [
|
||||
'uid',
|
||||
'petani_id',
|
||||
'bentuk_produk',
|
||||
'harga_panen_terakhir',
|
||||
'harga_tahun_lalu',
|
||||
'harga_dua_tahun_lalu',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
'deleted_by',
|
||||
];
|
||||
|
||||
|
||||
public function petani()
|
||||
{
|
||||
return $this->belongsTo(Petani::class, 'petani_id');
|
||||
}
|
||||
|
||||
public function creator()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'created_by');
|
||||
}
|
||||
|
||||
public function updater()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'updated_by');
|
||||
}
|
||||
|
||||
public function deleter()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'deleted_by');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user