角色表
$table->bigIncrements('id');
// 角色
$table->unsignedInteger('role_id')->default(0)->comment('角色ID');
$table->string('username',50)->comment('账号');
$table->string('truename',50)->default('未知')->comment('真是姓名');
$table->string('password',255)->comment('密码');
//nullable 可以为null
$table->string('email',50)->nullable()->comment('邮箱');
$table->string('phone',15)->default('')->comment('手机号码');
$table->enum('sex',['先生','女士'])->default('先生')->comment('性别');
$table->char('last_ip',15)->default('')->comment('登录IP');
$table->timestamps();
//软删除 生成一字段 deleted_at字段
$table->softDeletes();
|