123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- use Illuminate\Support\Facades\Schema;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- class CreateUsersTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('users', function (Blueprint $table) {
- $table->bigIncrements('id');
- $table->string('nickname', 100)->nullable()->comment('昵称');
- $table->string('truename', 20)->nullable()->comment('真实姓名');
- $table->char('card_id', 20)->nullable()->comment('身份证号');
- $table->string('avatar')->nullable()->comment('头像');
- $table->tinyInteger('gender')->default(0)->comment('性别(1:男;2:女;0:未知)');
- $table->char('mobile', 12)->nullable()->comment('手机号');
- $table->string('country', 20)->nullable()->comment('国家');
- $table->string('province', 10)->nullable()->comment('省份');
- $table->string('city', 10)->nullable()->comment('城市');
- $table->string('register_source', 20)->nullable()->comment('注册来源');
- $table->string('register_area_name', 20)->nullable()->comment('注册区域名称');
- $table->bigInteger('register_area', 20)->nullable()->comment('注册区域id');
- $table->tinyInteger('is_card_certified')->default(0)->comment('是否实名认证');
- $table->tinyInteger('is_deposi')->default(0)->comment('是否缴纳押金');
- $table->tinyInteger('is_match_ride_age')->default(0)->comment('是否到了骑车的年龄');
- $table->decimal('deposit_money', 15, 2)->default(0.00)->comment('押金');
- $table->decimal('recharge', 15, 2)->default(0.00)->comment('充值金额');
- $table->decimal('wallet_money', 15, 2)->default(0.00)->comment('余额');
- $table->integer('score')->default(0)->comment('积分');
- $table->float('my_journey')->default(0.00)->comment('my_journey');
- $table->tinyInteger('status')->default(1);
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('user');
- }
- }
|