Complete adaptation from BukidBountyApp to Philippine barangay governance: - Barangay models: Resident, Household, HouseholdMember, Blotter, BlotterHearing, DocumentRequest, RequestPayment, RequestType, BarangayProject, BarangayBudget - Controllers: ResidentController, HouseholdController, BlotterController, BlotterHearingController, DocumentRequestController, RequestTypeController, ProjectController, BudgetController, QRPHController, AdminConsoleController, UserController, FileController, ChapterController, LoginController - Vue pages: Home, ManageResidents, ResidentProfile, ManageHouseholds, ManageBlotters, BlotterDetail, RequestDocument, ManageDocumentRequests, DocumentRequestDetail, ManageRequestTypes, ManageProjects, BudgetLedger, AdminConsole - Barangay roles: PunongBarangay, Kagawad, Secretary, Treasurer, SK, Tanod, BHW, Staff, Resident - UserPermissions matrix rewritten with barangay-specific permission mappings - VueRouteMap replaced with barangay SPA routes - UserActions enum references corrected across all controllers - Removed all market/cooperative/POS/subscription code and models
31 lines
601 B
PHP
31 lines
601 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Models\Barangay;
|
|
|
|
use App\Models\Model;
|
|
|
|
class HouseholdMember extends Model
|
|
{
|
|
protected ?string $table = 'barangay_household_members';
|
|
|
|
protected array $fillable = [
|
|
'household_id', 'resident_id', 'relationship_to_head', 'is_active',
|
|
];
|
|
|
|
protected array $casts = [
|
|
'is_active' => 'boolean',
|
|
];
|
|
|
|
public function household()
|
|
{
|
|
return $this->belongsTo(Household::class, 'household_id');
|
|
}
|
|
|
|
public function resident()
|
|
{
|
|
return $this->belongsTo(Resident::class, 'resident_id');
|
|
}
|
|
}
|