akses pasar
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Pertanian;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use App\Models\User;
|
||||
use App\Models\Pertanian\Petani;
|
||||
|
||||
class AksesPasar extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'akses_pasar';
|
||||
|
||||
protected $fillable = [
|
||||
'uid',
|
||||
'petani_id',
|
||||
'skor_pengalaman',
|
||||
'saluran_terdahulu',
|
||||
'saluran_terdahulu_lainnya',
|
||||
'alasan_berhenti',
|
||||
'praktik_fermentasi',
|
||||
'proses_fermentasi',
|
||||
'model_fermentasi_memungkinkan',
|
||||
'skor_kesadaran_premium',
|
||||
'sumber_info_premium',
|
||||
'waktu_mulai_wawancara',
|
||||
'waktu_selesai_wawancara',
|
||||
'skor_kepercayaan_responden',
|
||||
'kehadiran_orang_lain',
|
||||
'skor_pengaruh_orang_lain',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
'deleted_by',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'saluran_terdahulu' => 'array',
|
||||
];
|
||||
|
||||
|
||||
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