guessing-miniprogram/database/migrations/2024_05_16_112901_create_ac...

34 lines
989 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?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')->default(0)->comment('状态0未发布1进行中2已开奖');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('activities');
}
};