feat: add AnggotaKeluarga, RiwayatBantuan, PermohonanTransfer models and migrations
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class RiwayatBantuan extends Model
|
||||
{
|
||||
protected $table = 'riwayat_bantuan';
|
||||
protected $fillable = [
|
||||
'id_rumah', 'ibadah_id', 'dicatat_oleh',
|
||||
'jenis_bantuan', 'keterangan', 'tanggal_bantuan',
|
||||
];
|
||||
protected $casts = ['tanggal_bantuan' => 'date'];
|
||||
|
||||
public function rumahMiskin() { return $this->belongsTo(RumahMiskin::class, 'id_rumah', 'id_rumah'); }
|
||||
public function ibadah() { return $this->belongsTo(RumahIbadah::class, 'ibadah_id'); }
|
||||
public function pencatat() { return $this->belongsTo(User::class, 'dicatat_oleh'); }
|
||||
}
|
||||
Reference in New Issue
Block a user