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,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class PermohonanTransfer extends Model
|
||||
{
|
||||
protected $table = 'permohonan_transfer';
|
||||
protected $fillable = [
|
||||
'dari_ibadah_id', 'ke_ibadah_id', 'id_rumah',
|
||||
'alasan', 'status', 'catatan_respons',
|
||||
'diajukan_oleh', 'diproses_oleh',
|
||||
];
|
||||
|
||||
public function dariIbadah() { return $this->belongsTo(RumahIbadah::class, 'dari_ibadah_id'); }
|
||||
public function keIbadah() { return $this->belongsTo(RumahIbadah::class, 'ke_ibadah_id'); }
|
||||
public function rumahMiskin() { return $this->belongsTo(RumahMiskin::class, 'id_rumah', 'id_rumah'); }
|
||||
public function pengaju() { return $this->belongsTo(User::class, 'diajukan_oleh'); }
|
||||
public function pemroses() { return $this->belongsTo(User::class, 'diproses_oleh'); }
|
||||
}
|
||||
Reference in New Issue
Block a user