feat: add AnggotaKeluarga, RiwayatBantuan, PermohonanTransfer models and migrations
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -14,5 +14,15 @@ class RumahMiskin extends Model
|
||||
protected $primaryKey = 'id_rumah';
|
||||
public $incrementing = false;
|
||||
protected $keyType = 'string';
|
||||
protected $fillable = ['id_rumah', 'alamat', 'jumlah_kk', 'jumlah_orang', 'latitude', 'longitude'];
|
||||
protected $fillable = ['id_rumah', 'nama_kk', 'alamat', 'jumlah_kk', 'jumlah_orang', 'latitude', 'longitude', 'pekerjaan', 'pendapatan', 'kondisi_rumah', 'keterangan'];
|
||||
|
||||
public function anggota()
|
||||
{
|
||||
return $this->hasMany(AnggotaKeluarga::class, 'id_rumah', 'id_rumah');
|
||||
}
|
||||
|
||||
public function bantuan()
|
||||
{
|
||||
return $this->hasMany(RiwayatBantuan::class, 'id_rumah', 'id_rumah');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user