id(); $table->integer('data_id')->default(0)->comment('赛事数据id'); $table->integer('home_team_id')->nullable()->default(0)->comment('主队球队数据id'); $table->string('home_team_en', 200)->nullable()->comment('主队英文名'); $table->string('home_team', 200)->nullable()->comment('主队'); $table->string('home_team_logo', 200)->nullable()->comment('主队logo'); $table->integer('guest_team_id')->nullable()->default(0)->comment('客队球队数据id'); $table->string('guest_team_en', 200)->nullable()->comment('客队英文名'); $table->string('guest_team', 200)->nullable()->comment('客队'); $table->string('guest_team_logo', 200)->nullable()->comment('客队logo'); $table->string('half_score', 100)->nullable()->default('0-0')->comment('半场比分'); $table->string('rbt', 20)->nullable()->comment('比赛时间'); // 建议改名 match_time 或 match_datetime $table->tinyInteger('is_roll')->nullable()->default(0)->comment('是否滚球'); $table->string('score', 100)->nullable()->default('0-0')->comment('全场比分'); $table->string('league_en', 200)->nullable()->comment('联赛英文名'); $table->string('league', 200)->nullable()->comment('联赛'); $table->mediumText('odds')->nullable()->comment('赔率'); $table->integer('state')->default(0)->comment('比赛状态:0未开始1进行中2已完场3延期4取消'); $table->integer('game_time')->default(0)->comment('比赛时间'); $table->tinyInteger('status')->default(0)->comment('状态:1上架0下架-1删除'); $table->string('handicap_limit', 30)->nullable()->default('1-7000')->comment('让球限额'); $table->string('over_under_limit', 30)->nullable()->default('1-7000')->comment('大小限额'); $table->string('duying_limit', 30)->nullable()->default('1-2800')->comment('独赢,胜负平限额'); $table->string('correct_core_limit', 30)->nullable()->default('1-700')->comment('波胆限额'); $table->string('odd_even_limit', 30)->nullable()->default('1-7000')->comment('单双限额'); $table->string('total_goal_limit', 30)->nullable()->default('1-3500')->comment('总进球限额'); $table->tinyInteger('is_handicap')->nullable()->default(1); $table->tinyInteger('is_over_under')->nullable()->default(1); $table->tinyInteger('is_duying')->nullable()->default(1); $table->tinyInteger('is_correct_core')->nullable()->default(1); $table->tinyInteger('is_odd_even')->nullable()->default(1); $table->tinyInteger('is_total_goal')->nullable()->default(1); // $table->integer('create_time')->default(0)->comment('创建时间'); // $table->integer('update_time')->default(0)->comment('更新时间'); $table->tinyInteger('is_locked')->nullable()->default(0)->comment('是否加锁'); $table->timestamps(); // 索引 $table->index('data_id'); $table->index('game_time'); $table->index('league'); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('sports'); } };