ufutx.dma/database/migrations/2024_02_18_171603_create_table_activity.php
2026-03-04 14:42:40 +08:00

47 lines
1.7 KiB
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.
*
* @return void
*/
public function up()
{
Schema::create('activity', function (Blueprint $table) {
$table->id();
$table->string('title')->comment('主标题');
$table->string('sub_title')->nullable()->comment('副标题');
$table->text('pic')->nullable()->comment('活动图片');
$table->text('share_pic')->nullable()->comment('分享图片');
$table->dateTime('start_time')->nullable()->comment('活动开始时间');
$table->dateTime('end_time')->nullable()->comment('活动结束时间');
$table->dateTime('apply_end_time')->nullable()->comment('报名截止时间');
$table->tinyInteger('status')->default(0)->comment("0:关闭 1:打开");
$table->tinyInteger('is_free')->default(0)->comment("0:免费 1:收费");
$table->tinyInteger('is_online')->default(0)->comment("0:线上 1:线下");
$table->text('sku')->nullable()->comment('规格配置');
$table->string('longitude',20)->nullable()->comment('经度');
$table->string('latitude',20)->nullable()->comment('维度');
$table->string('address')->nullable()->comment('地址');
$table->longText('describe')->nullable()->comment('富文本内容');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('activity');
}
};