商户后台

This commit is contained in:
liu
2026-06-17 12:41:49 +08:00
parent 845bea4b81
commit f63a7db58f
46 changed files with 2215 additions and 43 deletions
@@ -23,7 +23,7 @@ return new class extends Migration
$table->integer('sex')->default(0)->comment('性别(男、女)');
$table->string('bio', 255)->default('')->nullable()->comment('个人简介');
$table->string('mobile', 20)->default('')->comment('手机号');
$table->string('email', 50)->unique()->comment('邮箱');
$table->string('email', 50)->default('')->comment('邮箱');
$table->timestamp('email_verified_at')->nullable();
$table->integer('dept_id')->default(0)->comment('部门ID');
$table->string('login_ip', 60)->default('')->comment('最后登录IP');
@@ -78,7 +78,7 @@ return new class extends Migration
$table->comment('系统用户部门表');
});
}
// 系统用户权限表
if (! Schema::hasTable('sys_rule')) {
Schema::create('sys_rule', function (Blueprint $table) {
@@ -8,21 +8,6 @@ return new class extends Migration
{
public function up(): void
{
// 商户分类
if (! Schema::hasTable('merchant_categories')) {
Schema::create('merchant_categories', function (Blueprint $table) {
$table->id();
$table->string('name', 50)->comment('分类名称');
$table->string('slug', 50)->comment('标识');
$table->string('description', 255)->default('')->comment('描述');
$table->string('icon', 255)->default('')->comment('图标');
$table->integer('sort')->default(0)->comment('排序');
$table->tinyInteger('status')->default(1)->comment('状态:0=禁用,1=正常');
$table->timestamps();
$table->unique('slug');
$table->comment('商户分类');
});
}
// 商户/店铺
if (! Schema::hasTable('merchants')) {
@@ -74,6 +59,22 @@ return new class extends Migration
});
}
// 商户商品分类
if (! Schema::hasTable('platform_categories')) {
Schema::create('platform_categories', function (Blueprint $table) {
$table->id();
$table->string('name', 50)->comment('分类名称');
$table->string('slug', 50)->comment('标识');
$table->string('description', 255)->default('')->comment('描述');
$table->string('icon', 255)->default('')->comment('图标');
$table->integer('sort')->default(0)->comment('排序');
$table->tinyInteger('status')->default(1)->comment('状态:0=禁用,1=正常');
$table->timestamps();
$table->unique('slug');
$table->comment('商户分类');
});
}
// 商品
if (! Schema::hasTable('merchant_products')) {
Schema::create('merchant_products', function (Blueprint $table) {