Files
thankcard-system/database/migrations/0001_01_01_000000_create_users_table.php
T
2026-07-03 09:10:54 +07:00

40 lines
1.3 KiB
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('user', function (Blueprint $table) {
$table->increments('id');
$table->integer('msnv')->unique();
$table->string('name');
$table->string('mail');
$table->string('pass');
$table->string('departments');
$table->string('avatar')->nullable();
$table->tinyInteger('role')->default(0)->comment('0: member, default / 1: admin');
$table->tinyInteger('status')->default(1)->comment('0: đã nghỉ / 1: đang làm, default');
$table->integer('card')->default(0);
$table->tinyInteger('flag_send')->default(0)->comment('0: không được gửi card / 1: được gửi card');
$table->tinyInteger('first_login')->default(1)->comment('0: không là lần đầu / 1: lần đầu, default');
});
// Only user table remains
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('user');
}
};