31 lines
650 B
PHP
31 lines
650 B
PHP
<?php
|
|
|
|
namespace App\Models\Pertanian;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class PendapatanLuarPertanian extends Model
|
|
{
|
|
protected $table = 'pendapatan_luar_pertanian';
|
|
|
|
protected $fillable = [
|
|
'uid',
|
|
'sosial_ekonomi_id',
|
|
'jenis_pekerjaan',
|
|
'estimasi_per_bulan',
|
|
'created_by',
|
|
'updated_by',
|
|
'deleted_by',
|
|
];
|
|
|
|
protected $casts = [
|
|
'estimasi_per_bulan' => 'integer',
|
|
];
|
|
|
|
public function sosialEkonomi(): BelongsTo
|
|
{
|
|
return $this->belongsTo(SosialEkonomi::class, 'sosial_ekonomi_id');
|
|
}
|
|
}
|