61 lines
2.9 KiB
PHP
61 lines
2.9 KiB
PHP
<?php
|
||
|
||
use Illuminate\Database\Migrations\Migration;
|
||
use Illuminate\Database\Schema\Blueprint;
|
||
use Illuminate\Support\Facades\Schema;
|
||
|
||
return new class extends Migration
|
||
{
|
||
/**
|
||
* Run the migrations.
|
||
*
|
||
* @return void
|
||
*/
|
||
public function up()
|
||
{
|
||
Schema::create('oldmen', function (Blueprint $table) {
|
||
$table->id();
|
||
$table->string('floor_name', 50)->nullable()->comment('楼栋');
|
||
$table->string('agreement_no', 100)->nullable()->comment('协议号码');
|
||
$table->string('name', 50)->default('')->comment('姓名');
|
||
$table->unsignedTinyInteger('sex')->default(0)->comment('性别:1男2女');
|
||
$table->dateTime('birthday')->nullable()->comment('出生日期');
|
||
$table->string('card_no', 50)->unique();
|
||
$table->string('card_city_code')->nullable()->comment('户籍地区代码');
|
||
$table->unsignedBigInteger('card_province_id')->default(0)->comment('户籍-省');
|
||
$table->unsignedBigInteger('card_city_id')->default(0)->comment('户籍-市');
|
||
$table->unsignedBigInteger('card_area_id')->default(0)->comment('户籍-区');
|
||
$table->string('card_address', 100)->default('')->comment('户籍-街道详细地址');
|
||
$table->string('card_complete_address')->default('')->comment('户籍-完整地址');
|
||
$table->string('client_name', 50)->default('')->comment('委托人名称');
|
||
$table->string('client_city_code')->nullable()->comment('委托人-地区代码');
|
||
$table->unsignedBigInteger('client_province_id')->default(0)->comment('委托人-省');
|
||
$table->unsignedBigInteger('client_city_id')->default(0)->comment('委托人-市');
|
||
$table->unsignedBigInteger('client_area_id')->default(0)->comment('委托人-区');
|
||
$table->string('client_address', 100)->default('')->comment('委托人-街道详细地址');
|
||
$table->string('client_complete_address')->default('')->comment('委托人-完整地址');
|
||
$table->string('client_phone', 20)->default('')->comment('委托人-手机号');
|
||
$table->unsignedBigInteger('nurse_lv')->default(0)->comment('护理级别');
|
||
$table->unsignedTinyInteger('live_in')->default(0)->comment('入住状态:0未住1在住');
|
||
$table->unsignedBigInteger('need_pay')->default(0)->comment('缴费状态:0正常1待续费2已欠费');
|
||
$table->timestamp('live_in_at')->nullable()->comment('入住时间');
|
||
$table->timestamp('avliable_at')->nullable()->comment('截至时间');
|
||
$table->json('bonds')->nullable()->comment('保证金');
|
||
|
||
$table->timestamps();
|
||
|
||
$table->comment('客人信息');
|
||
});
|
||
}
|
||
|
||
/**
|
||
* Reverse the migrations.
|
||
*
|
||
* @return void
|
||
*/
|
||
public function down()
|
||
{
|
||
Schema::dropIfExists('oldmen');
|
||
}
|
||
};
|