update database

This commit is contained in:
manhlab
2021-04-09 11:06:46 -04:00
parent 311b478270
commit dbe6e18227
3 changed files with 18 additions and 6 deletions

View File

@@ -12,15 +12,15 @@ class DepartmentSeeder extends Seeder
public function run()
{
DB::table('departments')->insert([
['id' => 'BGD', 'name' => 'Ban Giám đốc', 'tel' => '0123456600'],
['id' => 'PKHSX', 'name' => 'Phòng Kế hoạch - Sản xuất', 'tel' => '0123456700'],
['id' => 'BGD', 'name' => 'Совет управляющих', 'tel' => '0123456600'],
['id' => 'PKHSX', 'name' => 'Производственный отдел', 'tel' => '0123456700'],
['id' => 'PTCLD', 'name' => 'Phòng Tổ chức - Lao động', 'tel' => '0123456701'],
['id' => 'PTC', 'name' => 'Phòng Tài chính', 'tel' => '0123456702'],
['id' => 'PKTCN', 'name' => 'Phòng Kỹ thuật - Công nghệ', 'tel' => '0123456703'],
['id' => 'PVT', 'name' => 'Phòng Vật tư', 'tel' => '0123456704'],
['id' => 'PTC', 'name' => 'Финансовый отдел', 'tel' => '0123456702'],
['id' => 'PKTCN', 'name' => 'Отдел технологий', 'tel' => '0123456703'],
['id' => 'PVT', 'name' => 'Офисные принадлежности', 'tel' => '0123456704'],
['id' => 'PKCS', 'name' => 'Phòng KCS', 'tel' => '0123456705'],
['id' => 'PHCHC', 'name' => 'Phòng Hành chính - Hậu cần', 'tel' => '0123456706'],
['id' => 'PCT', 'name' => 'Phòng Chính trị', 'tel' => '0123456707'],
['id' => 'PCT', 'name' => 'Политический отдел', 'tel' => '0123456707'],
['id' => 'PTKCN', 'name' => 'Phòng Thiết Kế - Công Nghệ', 'tel' => '0123456708'],
['id' => 'BATLD', 'name' => 'Ban An Toàn Lao Động', 'tel' => '0123456709'],
['id' => 'XDL', 'name' => 'Phân xưởng Động lực', 'tel' => '0123456710'],

View File

@@ -92,5 +92,6 @@ class PermissionSeeder extends Seeder
}
User::find('PKTCN-TP-1')->assignRole('Администратор');
User::find('PKTCN-TP-100')->assignRole('Руководитель подразделения');
}
}

View File

@@ -24,6 +24,17 @@ class UserSeeder extends Seeder
'title_id' => 'TP',
'email_verified_at' => now(),
],
[
'id' => 'PKTCN-TP-100',
'name' => 'User',
'email' => 'user@domain.com',
'password' => Hash::make('password'),
'tel' => '7988111000',
'birthday' => '1975-04-30',
'department_id' => 'PKTCN',
'title_id' => 'TP',
'email_verified_at' => now(),
],
]);
factory(App\Entities\User::class, 300)->create();