<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateOrder extends Migration { public function up() { Schema::create('order', function (Blueprint $onV5E) { $onV5E->increments('id'); $onV5E->timestamps(); $onV5E->string('sn', 30)->nullable()->comment('订单号'); $onV5E->integer('memberUserId')->nullable()->comment('用户ID'); $onV5E->tinyInteger('status')->nullable()->comment('订单状态'); $onV5E->decimal('fee', 20, 2)->nullable()->comment('价格'); $onV5E->decimal('shippingFee', 20, 2)->nullable()->comment('运费'); $onV5E->decimal('totalFee', 20, 2)->nullable()->comment('总价格'); $onV5E->decimal('payFee', 20, 2)->nullable()->comment('支付价格'); $onV5E->string('addressName', 20)->nullable()->comment('收货人:姓名'); $onV5E->string('addressPhone', 20)->nullable()->comment('收货人:手机号'); $onV5E->string('addressArea', 100)->nullable()->comment('收货人:省市地区'); $onV5E->string('addressDetail', 200)->nullable()->comment('收货人:详细地址'); $onV5E->string('addressPost', 20)->nullable()->comment('收货人:邮政编码'); $onV5E->string('shippingName', 50)->nullable()->comment('物流:公司'); $onV5E->string('shippingCode', 50)->nullable()->comment('物流:快递号'); $onV5E->string('remark', 400)->nullable()->comment('订单备注'); $onV5E->tinyInteger('deleted')->nullable()->comment('是否删除'); $onV5E->index('memberUserId'); $onV5E->unique('sn'); }); } public function down() { } }