123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- return new class extends Migration {
- /**
- * Run the migrations.
- */
- public function up(): void
- {
- Schema::create('member_users', function (Blueprint $table) {
- $table->id();
- $table->string('mobile')->nullable()->comment('手机号');
- $table->string('password')->default('')->comment('密码');
- $table->tinyInteger('status')->default(0)->comment('状态 (0正常 1停用)');
- $table->string('register_ip')->comment('注册IP');
- $table->tinyInteger('register_terminal')->nullable()->comment('注册终端');
- $table->string('login_ip', 50)->nullable()->comment('最后登录IP');
- $table->timestamp('login_date')->nullable()->comment('最后登录时间');
- $table->string('nickname')->nullable()->comment('用户昵称');
- $table->string('avatar')->nullable()->comment('用户头像');
- $table->string('name')->nullable()->comment('用户姓名');
- $table->tinyInteger('sex')->default(0)->nullable()->comment('用户性别');
- $table->bigInteger('area_id')->nullable()->comment('所在地');
- $table->timestamp('birthday')->nullable()->comment('出生日期');
- $table->string('mark')->nullable()->comment('会员备注');
- $table->integer('point')->default(0)->comment('用户积分');
- $table->string('tag_ids')->nullable()->comment('用户标签编号列表,以逗号分隔');
- $table->bigInteger('level_id')->nullable()->comment('等级编号');
- $table->integer('experience')->default(0)->comment('用户经验');
- $table->bigInteger('group_id')->nullable()->comment('用户分组');
- $table->string('creator', 64)->nullable()->comment('创建者');
- $table->string('updater', 64)->nullable()->comment('更新者');
- $table->timestamps();
- $table->softDeletes();
- });
- }
- /**
- * Reverse the migrations.
- */
- public function down(): void
- {
- Schema::dropIfExists('member_users');
- }
- };
|