generated from liutk/owl-admin-base
34 lines
977 B
PHP
34 lines
977 B
PHP
<?php
|
||
|
||
use Illuminate\Database\Migrations\Migration;
|
||
use Illuminate\Database\Schema\Blueprint;
|
||
use Illuminate\Support\Facades\Schema;
|
||
|
||
return new class extends Migration
|
||
{
|
||
/**
|
||
* Run the migrations.
|
||
*/
|
||
public function up(): void
|
||
{
|
||
Schema::create('activities', function (Blueprint $table) {
|
||
$table->id();
|
||
$table->string('name')->comment('名称');
|
||
$table->string('cover')->nullable()->comment('封面图');
|
||
$table->timestamp('start_at')->comment('开始时间');
|
||
$table->timestamp('end_at')->comment('结束时间');
|
||
$table->text('rules')->nullable()->comment('规则内容');
|
||
$table->unsignedTinyInteger('state')->comment('状态:0未发布,1进行中,2已开奖');
|
||
$table->timestamps();
|
||
});
|
||
}
|
||
|
||
/**
|
||
* Reverse the migrations.
|
||
*/
|
||
public function down(): void
|
||
{
|
||
Schema::dropIfExists('activities');
|
||
}
|
||
};
|