42 lines
1.1 KiB
PHP
42 lines
1.1 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('discount',function (Blueprint $table){
|
|
$table->id()->autoIncrement();
|
|
$table->string('code',100)->nullable();
|
|
$table->integer('start')->nullable();
|
|
$table->integer('end')->nullable();
|
|
$table->integer('count')->default(0);
|
|
$table->integer('discount')->nullable();
|
|
$table->integer('use')->default(0);
|
|
$table->integer('save')->default(0);
|
|
$table->tinyInteger('type')->default(1)->comment('1: %, 0: *.000.000');
|
|
$table->tinyInteger('status')->default(1);
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
//
|
|
Schema::dropIfExists('discount');
|
|
}
|
|
};
|