2022_01_04_093052_create_membership_table.php
1.3 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
38
39
40
41
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMembershipTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('membership', function (Blueprint $table) {
$table->increments('id');
$table->string('name')->default('')->comment('会员名称');
$table->decimal('price')->comment('价格(分)');
$table->decimal('origin_price')->comment('原价(分)');
$table->integer('limit_days')->comment('有效天数');
$table->string('limit_unit')->comment('有效期单位');
$table->string('intro')->default('')->comment('简介');
$table->string('image')->default('')->comment('介绍图');
$table->unsignedTinyInteger('sale_term')->default('')->comment('上架终端');
$table->unsignedTinyInteger('state')->comment('状态:1=售卖中');
$table->unsignedTinyInteger('sn')->comment('SN顺序');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('membership');
}
}