bigInteger('user_id')->unique()->comment('外键用户'); $table->string('full_name')->nullable()->comment('全名'); $table->enum('gender',['未知','男','女'])->nullable()->comment('性别'); $table->string('identity_number')->nullable()->unique()->comment('身份证号'); $table->string('mobile_phone')->nullable()->index()->comment('手机号'); $table->enum('type',['无','员工','临时工','客户'])->default('无')->comment('类型'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('user_details'); } }