1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- class CreateUsersTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('users', function (Blueprint $table) {
- $table->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_shop_id', 20)->nullable()->comment('注册来源站点');
- $table->string('register_device_id', 20)->nullable()->comment('注册来源站点');
- $table->bigInteger('pid')->default(0)->comment('推荐用户');
- $table->decimal('wallet_money', 15, 2)->default(0.00)->comment('余额');
- $table->integer('score')->default(0)->comment('积分');
- $table->tinyInteger('status')->default(1);
- $table->rememberToken();
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::dropIfExists('users');
- }
- }
|