- Replace UserTypes with barangay roles (super_admin, punong_barangay, kagawad, secretary, treasurer, sk_chairperson, sk_councilor, tanod, bhw, daycare_worker, staff, resident, audit) - Replace UserActions with barangay-specific permissions (residents, households, blotters, documents, fee payments, projects, budget) - Replace modules config with barangay modules (residents, households, blotters, documents, certificates, projects, budget, announcements, accounting, chapters, qr_payment, subscriptions, landing_pages) - Update app name, seeders, and landing page to barangay defaults - Add new enums: DocumentStatus, BlotterStatus, PaymentStatus - Add 6 new migrations: residents, households, blotters, document requests, projects, budget - Add RequestTypeSeeder with default certificate fee schedule - Update README with BarangaySystem stack, roles, and remotes
95 lines
3.8 KiB
PHP
95 lines
3.8 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Hyperf\Database\Seeders\Seeder;
|
|
|
|
class RequestTypeSeeder extends Seeder
|
|
{
|
|
public function run(): void
|
|
{
|
|
$types = [
|
|
[
|
|
'name' => 'Barangay Clearance',
|
|
'code' => 'CLEARANCE',
|
|
'description' => 'General purpose barangay clearance for various applications.',
|
|
'base_fee' => 50.00,
|
|
'processing_days' => 1,
|
|
'is_active' => true,
|
|
'requires_clearance' => false,
|
|
],
|
|
[
|
|
'name' => 'Certificate of Residency',
|
|
'code' => 'RESIDENCY',
|
|
'description' => 'Proof of residency within the barangay.',
|
|
'base_fee' => 30.00,
|
|
'processing_days' => 1,
|
|
'is_active' => true,
|
|
'requires_clearance' => false,
|
|
],
|
|
[
|
|
'name' => 'Certificate of Indigency',
|
|
'code' => 'INDIGENCY',
|
|
'description' => 'Certification for indigent residents for government assistance.',
|
|
'base_fee' => 0.00,
|
|
'processing_days' => 1,
|
|
'is_active' => true,
|
|
'requires_clearance' => false,
|
|
],
|
|
[
|
|
'name' => 'Certificate of Good Moral Character',
|
|
'code' => 'GOOD_MORAL',
|
|
'description' => 'Character reference certificate from the barangay.',
|
|
'base_fee' => 50.00,
|
|
'processing_days' => 2,
|
|
'is_active' => true,
|
|
'requires_clearance' => false,
|
|
],
|
|
[
|
|
'name' => 'Business Clearance',
|
|
'code' => 'BUSINESS_CLEARANCE',
|
|
'description' => 'Barangay clearance for business registration and renewal.',
|
|
'base_fee' => 200.00,
|
|
'processing_days' => 3,
|
|
'is_active' => true,
|
|
'requires_clearance' => false,
|
|
],
|
|
[
|
|
'name' => 'Closure of Business',
|
|
'code' => 'BUSINESS_CLOSURE',
|
|
'description' => 'Certification for business closure.',
|
|
'base_fee' => 100.00,
|
|
'processing_days' => 3,
|
|
'is_active' => true,
|
|
'requires_clearance' => false,
|
|
],
|
|
[
|
|
'name' => 'Solo Parent ID',
|
|
'code' => 'SOLO_PARENT',
|
|
'description' => 'Certification for solo parent status.',
|
|
'base_fee' => 0.00,
|
|
'processing_days' => 2,
|
|
'is_active' => true,
|
|
'requires_clearance' => false,
|
|
],
|
|
[
|
|
'name' => 'Senior Citizen Assistance',
|
|
'code' => 'SENIOR_CITIZEN',
|
|
'description' => 'Certification for senior citizen benefits.',
|
|
'base_fee' => 0.00,
|
|
'processing_days' => 1,
|
|
'is_active' => true,
|
|
'requires_clearance' => false,
|
|
],
|
|
];
|
|
|
|
foreach ($types as $type) {
|
|
\Hyperf\DbConnection\Db::table('barangay_request_types')
|
|
->updateOrInsert(['code' => $type['code']], array_merge($type, [
|
|
'created_at' => now(),
|
|
'updated_at' => now(),
|
|
]));
|
|
}
|
|
}
|
|
}
|