diff --git a/database/migrations/2023_03_19_000000_create_v2_tables.php b/database/migrations/2023_03_19_000000_create_v2_tables.php index 059fcb9..f4915a2 100644 --- a/database/migrations/2023_03_19_000000_create_v2_tables.php +++ b/database/migrations/2023_03_19_000000_create_v2_tables.php @@ -72,7 +72,7 @@ return new class extends Migration { $table->integer('three_year_price')->nullable(); $table->integer('onetime_price')->nullable(); $table->integer('reset_price')->nullable(); - $table->boolean('reset_traffic_method')->nullable()->comment('重置流量方式:0跟随系统设置、1每月1号、2按月重置、3不重置、4每年1月1日、5按年重置'); + $table->integer('reset_traffic_method')->nullable()->comment('重置流量方式:0跟随系统设置、1每月1号、2按月重置、3不重置、4每年1月1日、5按年重置'); $table->integer('capacity_limit')->nullable(); $table->integer('created_at'); $table->integer('updated_at'); @@ -264,8 +264,8 @@ return new class extends Migration { $table->integer('refund_amount')->nullable()->comment('退款金额'); $table->integer('balance_amount')->nullable()->comment('使用余额'); $table->text('surplus_order_ids')->nullable()->comment('折抵订单'); - $table->boolean('status')->default(false)->comment('0待支付1开通中2已取消3已完成4已折抵'); - $table->boolean('commission_status')->default(false)->comment('0待确认1发放中2有效3无效'); + $table->integer('status')->default(0)->comment('0待支付1开通中2已取消3已完成4已折抵'); + $table->integer('commission_status')->default(false)->comment('0待确认1发放中2有效3无效'); $table->integer('commission_balance')->default(0); $table->integer('actual_commission_balance')->nullable()->comment('实际支付佣金'); $table->integer('paid_at')->nullable(); @@ -299,7 +299,7 @@ return new class extends Migration { $table->integer('id', true); $table->string('code'); $table->string('name'); - $table->boolean('type'); + $table->integer('type'); $table->integer('value'); $table->boolean('show')->default(false); $table->integer('limit_use')->nullable(); @@ -333,9 +333,9 @@ return new class extends Migration { $table->integer('id', true); $table->integer('user_id'); $table->string('subject'); - $table->boolean('level'); - $table->boolean('status')->default(false)->comment('0:已开启 1:已关闭'); - $table->boolean('reply_status')->default(true)->comment('0:待回复 1:已回复'); + $table->integer('level'); + $table->integer('status')->default(0)->comment('0:已开启 1:已关闭'); + $table->integer('reply_status')->default(1)->comment('0:待回复 1:已回复'); $table->integer('created_at'); $table->integer('updated_at'); }); @@ -421,7 +421,7 @@ return new class extends Migration { $table->string('host'); $table->integer('port'); $table->integer('server_port'); - $table->boolean('tls'); + $table->integer('tls'); $table->text('tls_settings')->nullable(); $table->string('flow', 64)->nullable(); $table->string('network', 11); diff --git a/database/migrations/2025_01_01_130644_modify_commission_status_in_v2_order_table.php b/database/migrations/2025_01_01_130644_modify_commission_status_in_v2_order_table.php index bda2a33..916e226 100644 --- a/database/migrations/2025_01_01_130644_modify_commission_status_in_v2_order_table.php +++ b/database/migrations/2025_01_01_130644_modify_commission_status_in_v2_order_table.php @@ -12,7 +12,7 @@ return new class extends Migration public function up(): void { Schema::table('v2_order', function (Blueprint $table) { - $table->boolean('commission_status')->nullable()->default(null)->comment('0待确认1发放中2有效3无效')->change(); + $table->integer('commission_status')->nullable()->default(null)->comment('0待确认1发放中2有效3无效')->change(); }); } @@ -22,7 +22,7 @@ return new class extends Migration public function down(): void { Schema::table('v2_order', function (Blueprint $table) { - $table->boolean('commission_status')->default(false)->comment('0待确认1发放中2有效3无效')->change(); + $table->integer('commission_status')->default(false)->comment('0待确认1发放中2有效3无效')->change(); }); } }; diff --git a/database/migrations/2025_01_04_optimize_plan_table.php b/database/migrations/2025_01_04_optimize_plan_table.php index c02598e..9d9a1ac 100644 --- a/database/migrations/2025_01_04_optimize_plan_table.php +++ b/database/migrations/2025_01_04_optimize_plan_table.php @@ -51,7 +51,7 @@ return new class extends Migration { ->comment('Transfer limit in bytes')->change(); $table->unsignedInteger('speed_limit')->nullable() ->comment('Speed limit in Mbps, 0 for unlimited')->change(); - $table->unsignedSmallInteger('reset_traffic_method')->nullable()->default(0) + $table->integer('reset_traffic_method')->nullable()->default(0) ->comment('重置流量方式:0跟随系统设置、1每月1号、2按月重置、3不重置、4每年1月1日、5按年重置')->change(); $table->unsignedInteger('capacity_limit')->nullable()->default(0) ->comment('0 for unlimited')->change(); diff --git a/database/migrations/2025_01_12_200936_modify_commission_status_in_v2_order_table.php b/database/migrations/2025_01_12_200936_modify_commission_status_in_v2_order_table.php index 6f732c7..668ef17 100644 --- a/database/migrations/2025_01_12_200936_modify_commission_status_in_v2_order_table.php +++ b/database/migrations/2025_01_12_200936_modify_commission_status_in_v2_order_table.php @@ -16,7 +16,7 @@ return new class extends Migration 'commission_status' => 0 ]); Schema::table('v2_order', function (Blueprint $table) { - $table->boolean('commission_status')->default(value: 0)->comment('0待确认1发放中2有效3无效')->change(); + $table->integer('commission_status')->default(value: 0)->comment('0待确认1发放中2有效3无效')->change(); }); } @@ -27,7 +27,7 @@ return new class extends Migration public function down(): void { Schema::table('v2_order', function (Blueprint $table) { - $table->boolean('commission_status')->nullable()->comment('0待确认1发放中2有效3无效')->change(); + $table->integer('commission_status')->nullable()->comment('0待确认1发放中2有效3无效')->change(); }); } };