2018_02_02_140725_creat_share_table.php
1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatShareTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('share', function (Blueprint $table) {
$table->increments('id');
$table->char('order_no',19)->comment('可以分享的单号');
$table->Integer('order_id')->unsigned()->comment('微导览单和租借单id');
$table->tinyInteger('type')->unsigned()->comment('订单的类型1讲解器租借交易2微导览交易');
$table->Integer('spot_id')->unsigned()->comment('景点id');
$table->Integer('business_id')->unsigned()->comment('商家id');
$table->unsignedInteger('customer_id')->comment('用户id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('share');
}
}