love_php/database/migrations/2018_12_17_154526_create_activities.php
2026-04-02 09:20:51 +08:00

50 lines
1.8 KiB
PHP

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateActivities extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('activities', function (Blueprint $table) {
$table->increments('id');
$table->string('theme')->nullable()->comment('主题');
$table->string('poster')->nullable()->comment('海报');
$table->string('host')->nullable()->comment('费用');
$table->decimal('fee', 7,2)->default(0)->comment('费用');
$table->text('detail')->nullable()->comment('详情');
$table->timestamp('start_time')->nullable()->comment('开始时间');
$table->timestamp('end_time')->nullable()->comment('结束时间');
$table->string('province', 20)->nullable()->comment('省');
$table->string('city', 20)->nullable()->comment('市');
$table->string('dist', 20)->nullable()->comment('区');
$table->string('address')->nullable()->comment('详情地址');
$table->string('location_latitude', 20)->nullable()->comment('纬度');
$table->string('location_longitude', 20)->nullable()->comment('经度');
$table->tinyInteger('is_deadline')->default(0)->comment('是否截止报名');
$table->tinyInteger('is_cancel')->default(0)->comment('是否取消');
$table->integer('click_num')->default(0)->comment('点击数');
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('activities');
}
}