Commit 3fadffdf by lujunyi

增加userid字段

parent 2dbe8e90
...@@ -14,10 +14,13 @@ public function up(): void ...@@ -14,10 +14,13 @@ public function up(): void
Schema::create('patient', function (Blueprint $table) { Schema::create('patient', function (Blueprint $table) {
$table->comment('问诊人'); $table->comment('问诊人');
$table->bigIncrements('id'); $table->bigIncrements('id');
$table->string('name', 50)->nullable()->comment('姓名'); $table->string('name', 50)->comment('姓名');
$table->tinyInteger('gender')->default(0)->comment('性别。[1=男性,2=女性,0=未知]'); $table->tinyInteger('gender')->default(0)->comment('性别。[1=男性,2=女性,0=未知]');
$table->string('id_card', 18)->nullable()->index('idx_idcard')->comment('身份证号'); $table->string('id_card', 18)->index('idx_idcard')->comment('身份证号');
$table->string('mobile', 11)->nullable()->index('idx_mobile')->comment('手机号'); $table->string('mobile', 11)->index('idx_mobile')->comment('手机号');
$table->bigInteger('user_id')->default(0)->index('idx_userid')->comment('用户表ID');
$table->bigInteger('pharmacy_id')->default(0)->index('idx_pharmacyid')->comment('药店表ID');
$table->boolean('is_default')->default(0)->comment('默认问诊人,用户添加的才需要设置[0=否,1=是]');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
}); });
......
...@@ -32,6 +32,7 @@ public function up() ...@@ -32,6 +32,7 @@ public function up()
$table->text('introduction')->nullable()->comment('简介'); $table->text('introduction')->nullable()->comment('简介');
$table->boolean('status')->default(0)->comment('是否启用[0=未启用,1=启用]'); $table->boolean('status')->default(0)->comment('是否启用[0=未启用,1=启用]');
$table->text('signed_pic')->nullable()->comment('签名照'); $table->text('signed_pic')->nullable()->comment('签名照');
$table->bigInteger('user_id')->nullable()->unique('uk_userid')->comment('用户表ID');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
}); });
......
...@@ -25,6 +25,7 @@ public function up() ...@@ -25,6 +25,7 @@ public function up()
$table->string('physician_license')->comment('执业资格证书'); $table->string('physician_license')->comment('执业资格证书');
$table->string('signed_pic')->comment('签名照'); $table->string('signed_pic')->comment('签名照');
$table->boolean('status')->default(0)->comment('启用[0=未启用,1=启用]'); $table->boolean('status')->default(0)->comment('启用[0=未启用,1=启用]');
$table->bigInteger('user_id')->nullable()->unique('uk_userid')->comment('用户表ID');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment