feat: Phase 1 bootstrap — adapt BukidBountyApp as BarangaySystem
- 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
This commit is contained in:
@@ -10,79 +10,63 @@ use Hypervel\Support\Str;
|
||||
|
||||
class UserSeeder extends Seeder
|
||||
{
|
||||
|
||||
protected $users = [
|
||||
[
|
||||
'name' => 'Admin Ultima User',
|
||||
'name' => 'System Administrator',
|
||||
'mobile_number' => '777',
|
||||
'nickname' => 'admin',
|
||||
'username' => 'admin',
|
||||
'email' => 'admin@example.com',
|
||||
'password' => 'OmegaPsilon32!',
|
||||
'acct_type' => 'ult',
|
||||
'acct_type' => 'super_admin',
|
||||
],
|
||||
[
|
||||
'name' => 'Super Op User',
|
||||
'name' => 'Punong Barangay',
|
||||
'mobile_number' => '09111111111',
|
||||
'nickname' => 'superop',
|
||||
'username' => 'test_super_op',
|
||||
'nickname' => 'captain',
|
||||
'username' => 'test_captain',
|
||||
'password' => 'TetraOmega21!',
|
||||
'acct_type' => 'super operator',
|
||||
'acct_type' => 'punong_barangay',
|
||||
],
|
||||
[
|
||||
'name' => 'Operator User',
|
||||
'name' => 'Barangay Secretary',
|
||||
'mobile_number' => '09222222222',
|
||||
'nickname' => 'operator',
|
||||
'username' => 'test_op',
|
||||
'nickname' => 'secretary',
|
||||
'username' => 'test_secretary',
|
||||
'password' => 'HeliosAlpha21!',
|
||||
'acct_type' => 'operator',
|
||||
'acct_type' => 'secretary',
|
||||
],
|
||||
[
|
||||
'name' => 'Coordinator User',
|
||||
'name' => 'Barangay Treasurer',
|
||||
'mobile_number' => '09333333333',
|
||||
'nickname' => 'coordinator',
|
||||
'username' => 'test_coord',
|
||||
'nickname' => 'treasurer',
|
||||
'username' => 'test_treasurer',
|
||||
'password' => 'ParagonSigma51!',
|
||||
'acct_type' => 'coordinator',
|
||||
'acct_type' => 'treasurer',
|
||||
],
|
||||
[
|
||||
'name' => 'Rider User',
|
||||
'name' => 'Sample Kagawad',
|
||||
'mobile_number' => '09444444444',
|
||||
'nickname' => 'rider',
|
||||
'username' => 'test_rider',
|
||||
'nickname' => 'kagawad',
|
||||
'username' => 'test_kagawad',
|
||||
'password' => 'MilipedeAstra21!',
|
||||
'acct_type' => 'rider',
|
||||
'acct_type' => 'kagawad',
|
||||
],
|
||||
[
|
||||
'name' => 'POS Terminal User',
|
||||
'name' => 'Sample Resident',
|
||||
'mobile_number' => '09555555555',
|
||||
'nickname' => 'pos',
|
||||
'username' => 'test_pos',
|
||||
'password' => 'MedicusGamma21!',
|
||||
'acct_type' => 'pos terminal',
|
||||
],
|
||||
[
|
||||
'name' => 'Standard User',
|
||||
'mobile_number' => '09666666666',
|
||||
'nickname' => 'user',
|
||||
'username' => 'test_user',
|
||||
'nickname' => 'resident',
|
||||
'username' => 'test_resident',
|
||||
'password' => 'OrionDraconis21!',
|
||||
'acct_type' => 'user',
|
||||
'acct_type' => 'resident',
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
foreach ($this->users as $data) {
|
||||
User::firstOrCreate(['mobile_number' => $data['mobile_number']], [
|
||||
'name' => $data['name'],
|
||||
// 'hashkey' => $data['hashkey'],
|
||||
|
||||
'nickname' => $data['nickname'] ?? null,
|
||||
'username' => $data['username'] ?? null,
|
||||
'email' => $data['email'] ?? null,
|
||||
@@ -109,4 +93,3 @@ class UserSeeder extends Seeder
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user