38 lines
808 B
PHP
38 lines
808 B
PHP
<?php
|
|
|
|
namespace App\Models\Pertanian;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class PengurusKelompokTani extends Model
|
|
{
|
|
use HasFactory, SoftDeletes;
|
|
|
|
protected $table = 'survey_pengurus_kelompok_tani';
|
|
|
|
protected $fillable = [
|
|
'uid',
|
|
'survey_kelompok_tani_id',
|
|
'nama_pengurus',
|
|
'jabatan',
|
|
'kontak',
|
|
'status',
|
|
|
|
'created_by',
|
|
'updated_by',
|
|
'deleted_by',
|
|
];
|
|
|
|
protected $casts = [
|
|
'status' => 'boolean',
|
|
];
|
|
|
|
public function kelompokTani(): BelongsTo
|
|
{
|
|
return $this->belongsTo(KelompokTani::class, 'survey_kelompok_tani_id');
|
|
}
|
|
}
|