38 lines
1.0 KiB
PHP
38 lines
1.0 KiB
PHP
<?php
|
||
|
||
use Illuminate\Support\Facades\Schema;
|
||
use Illuminate\Database\Schema\Blueprint;
|
||
use Illuminate\Database\Migrations\Migration;
|
||
|
||
class CreateMeets extends Migration
|
||
{
|
||
/**
|
||
* Run the migrations.
|
||
*
|
||
* @return void
|
||
*/
|
||
public function up()
|
||
{
|
||
Schema::create('appointments', function (Blueprint $table) {
|
||
$table->increments('id');
|
||
$table->string('name')->comment('名称');
|
||
$table->integer('num')->default(0)->comment('次数');
|
||
$table->enum('type',['active','passive'])->default('active')->comment('类型 active主动,passive被动');
|
||
$table->decimal('price', 9,2)->default(0)->comment('价格');
|
||
$table->integer('is_recommend')->default(0)->comment('是否推荐');
|
||
$table->timestamps();
|
||
$table->softDeletes();
|
||
});
|
||
}
|
||
|
||
/**
|
||
* Reverse the migrations.
|
||
*
|
||
* @return void
|
||
*/
|
||
public function down()
|
||
{
|
||
Schema::dropIfExists('appointments');
|
||
}
|
||
}
|