feat: 彩票业务迁移并补全后台权限与代理结算体系
This commit is contained in:
35
database/migrations/2026_05_08_100007_create_draws_table.php
Normal file
35
database/migrations/2026_05_08_100007_create_draws_table.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('draws', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('draw_no', 32)->unique();
|
||||
$table->date('business_date');
|
||||
$table->unsignedInteger('sequence_no');
|
||||
$table->string('status', 32);
|
||||
$table->timestamp('start_time')->nullable();
|
||||
$table->timestamp('close_time')->nullable();
|
||||
$table->timestamp('draw_time')->nullable();
|
||||
$table->timestamp('cooling_end_time')->nullable();
|
||||
$table->string('result_source', 16)->nullable()->comment('rng|manual');
|
||||
$table->unsignedInteger('current_result_version')->default(0);
|
||||
$table->unsignedInteger('settle_version')->default(0);
|
||||
$table->boolean('is_reopened')->default(false);
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['status', 'draw_time'], 'idx_draws_status_draw_time');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('draws');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user