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

43 lines
1.4 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('restaurant', function (Blueprint $table) {
$table->id();
$table->integer("user_id")->unsigned();
$table->integer("order_id")->unsigned()->comment('订单id');
$table->char("date",10)->comment('订餐日期');
$table->tinyInteger('diet_type')->comment('饮食类型 0:午饭 1:晚饭')->default(0);
$table->tinyInteger('food_type')->comment('订餐类型 0:装修日 1:清洁日')->default(0);
$table->decimal('amount',7,2)->comment('金额')->default(0);
$table->integer('num')->comment('份数')->default(0);
$table->tinyInteger('status')->comment('状态 0:已预定 1:已支付 2:等待出餐 3:已完成 4:已评价 5:已取消,')->default(0);
$table->integer('star')->comment('评价几星')->default(0);
$table->string('remark')->nullable()->comment('评价');
$table->text('images')->nullable()->comment('图片');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('restaurant');
}
};