Bổ sung default data migrate cho bảng danh mục
This commit is contained in:
parent
ae5737c3bf
commit
d69e01d6c7
|
|
@ -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(),
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue