client api

This commit is contained in:
pbao9
2026-02-11 10:08:39 +07:00
parent 458ad0a4cb
commit d59b2a0840
27 changed files with 4369 additions and 28 deletions
@@ -13,10 +13,10 @@ return new class extends Migration {
public function up()
{
//
Schema::create('customer', function (Blueprint $table) {
Schema::create('customers', function (Blueprint $table) {
$table->id();
$table->string('firstname', 100)->nullable();
$table->string('lastname', 100)->nullable();
$table->uuid('uuid')->unique();
$table->string('fullname', 100)->nullable();
$table->string('avatar', 100)->nullable();
$table->integer('gender')->default(0);
$table->string('address', 100)->nullable();
@@ -34,12 +34,27 @@ return new class extends Migration {
$table->string('password')->nullable();
$table->integer('credit')->default(0);
$table->integer('total')->default(0);
$table->string('cccd')->nullable();
$table->string('front_cccd')->nullable();
$table->string('back_cccd')->nullable();
$table->string('identity_number')->nullable();
$table->string('front_identity_number')->nullable();
$table->string('back_identity_number')->nullable();
$table->string('province_code', 20)->nullable();
$table->string('ward_code', 20)->nullable();
$table->string('remember_token', 100)->nullable();
$table->tinyInteger('status')->default(1);
$table->timestamps();
$table->foreign('province_code')
->references('code')
->on('provinces')
->onDelete('set null');
$table->foreign('ward_code')
->references('code')
->on('wards')
->onDelete('set null');
$table->index('province_code', 'idx_users_province');
$table->index('ward_code', 'idx_users_ward');
});
}