This commit is contained in:
2026-01-18 17:42:46 +08:00
parent 836bdc9409
commit f038dbab41
42 changed files with 3068 additions and 575 deletions

View File

@@ -1,72 +0,0 @@
<?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::table('member', function (Blueprint $table) {
$table->string('invite_code')->nullable()->after('login_count')->comment('推荐码');
$table->string('old_password')->nullable()->after('password')->comment('旧密码');
$table->string('salt')->nullable()->after('old_password')->comment('密码盐值');
$table->unsignedBigInteger('pm_uid')->nullable()->after('invite_code')->comment('健康管理师id');
$table->unsignedBigInteger('store_id')->nullable()->after('pm_uid')->comment('所属综合服务体');
});
Schema::create('member_pm', function (Blueprint $table) {
$table->id()->uniqid()->comment('主键id');
$table->unsignedBigInteger('member_id')->comment('用户id');
$table->tinyInteger('level')->default(1)->comment('等级');
$table->string('name')->nullable()->comment('名称');
$table->integer('sex')->default(0)->comment('内容');
$table->string('mobile')->nullable()->comment('电话');
$table->string('area')->nullable()->comment('区域');
$table->tinyInteger('store_id')->default(0)->comment('所属综合服务体');
$table->tinyInteger('status')->default(1)->comment('状态');
$table->bigInteger('end_time')->nullable()->comment('到期时间');
$table->timestamp('created_at')->nullable()->comment('创建时间');
$table->timestamp('updated_at')->nullable()->comment('更新时间');
$table->engine = 'InnoDB';
$table->charset = 'utf8mb4';
$table->collation = 'utf8mb4_unicode_ci';
$table->comment('会员工作室表');
});
Schema::create('member_store', function (Blueprint $table) {
$table->id()->uniqid()->comment('主键id');
$table->unsignedBigInteger('member_id')->comment('用户id');
$table->string('name')->nullable()->comment('名称');
$table->string('logo')->nullable()->comment('logo');
$table->string('mobile')->nullable()->comment('电话');
$table->string('area')->nullable()->comment('区域');
$table->string('address')->nullable()->comment('地址');
$table->string('map')->nullable()->comment('地图坐标');
$table->string('license')->nullable()->comment('营业执照');
$table->tinyInteger('status')->default(1)->comment('状态');
$table->timestamp('created_at')->nullable()->comment('创建时间');
$table->timestamp('updated_at')->nullable()->comment('更新时间');
$table->engine = 'InnoDB';
$table->charset = 'utf8mb4';
$table->collation = 'utf8mb4_unicode_ci';
$table->comment('会员综合服务体表');
});
}
/**
* Reverse the migrations.
*/
public function down(): void {
Schema::table('member', function (Blueprint $table) {
$table->dropColumn('invite_code');
$table->dropColumn('old_password');
$table->dropColumn('salt');
});
Schema::dropIfExists('member_pm');
Schema::dropIfExists('member_store');
}
};

View File

@@ -1,26 +0,0 @@
<?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::table('member', function (Blueprint $table) {
$table->string('date_type', 10)->default('lunar')->comment('会员生日类型')->after('birthday');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
//
}
};