feat(bet-provider): 添加开注商管理功能,包括增删改查接口及相关模型和迁移文件
Some checks failed
lotterLaravel CI / test (push) Has been cancelled
lotterLaravel E2E / e2e-api (push) Has been cancelled

This commit is contained in:
2026-07-08 15:56:35 +08:00
parent fbe182f6e6
commit 2d50980999
19 changed files with 382 additions and 57 deletions

View File

@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('bet_providers', function (Blueprint $table): void {
$table->id();
$table->string('code', 32)->unique();
$table->string('name', 64);
$table->boolean('is_enabled')->default(true);
$table->unsignedInteger('sort_order')->default(0);
$table->timestamps();
});
Schema::table('ticket_items', function (Blueprint $table): void {
$table->string('provider_code', 32)->default('SG')->after('draw_id');
$table->string('provider_name', 64)->default('Singapore')->after('provider_code');
$table->index('provider_code', 'idx_ticket_items_provider_code');
});
}
public function down(): void
{
Schema::table('ticket_items', function (Blueprint $table): void {
$table->dropIndex('idx_ticket_items_provider_code');
$table->dropColumn(['provider_code', 'provider_name']);
});
Schema::dropIfExists('bet_providers');
}
};