first initial

This commit is contained in:
2025-05-27 19:09:17 +07:00
commit 80375d8af3
1587 changed files with 572586 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->bigInteger('dealer_id')->unsigned();
$table->foreign('dealer_id')->references('id')->on('dealers')->onDelete('cascade');
$table->enum('role', ['admin', 'sa', 'mechanic']);
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}