diff --git a/BACKEND/database/migrations/2024_08_02_025714_create_categories_table.php b/BACKEND/database/migrations/2024_08_02_025714_create_categories_table.php index 39f5297..0336713 100644 --- a/BACKEND/database/migrations/2024_08_02_025714_create_categories_table.php +++ b/BACKEND/database/migrations/2024_08_02_025714_create_categories_table.php @@ -2,6 +2,7 @@ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; +use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; return new class extends Migration @@ -20,6 +21,54 @@ return new class extends Migration $table->integer('c_active'); $table->timestamps(); }); + + DB::table('categories')->insert([ + [ + 'c_code' => 'S', + 'c_name' => 'Buổi Sáng', + 'c_type' => 'TIME_TYPE', + 'c_value' => null, + 'c_active' => 1, + 'created_at' => now(), + 'updated_at' => now(), + ], + [ + 'c_code' => 'C', + 'c_name' => 'Buổi Chiều', + 'c_type' => 'TIME_TYPE', + 'c_value' => null, + 'c_active' => 1, + 'created_at' => now(), + 'updated_at' => now(), + ], + [ + 'c_code' => 'ALL', + 'c_name' => 'Cả Ngày', + 'c_type' => 'TIME_TYPE', + 'c_value' => null, + 'c_active' => 1, + 'created_at' => now(), + 'updated_at' => now(), + ], + [ + 'c_code' => 'WFH', + 'c_name' => 'Work For Home', + 'c_type' => 'REASON', + 'c_value' => null, + 'c_active' => 1, + 'created_at' => now(), + 'updated_at' => now(), + ], + [ + 'c_code' => 'ONLEAVE', + 'c_name' => 'Nghỉ phép', + 'c_type' => 'REASON', + 'c_value' => null, + 'c_active' => 1, + 'created_at' => now(), + 'updated_at' => now(), + ], + ]); } /**