39 lines
1.0 KiB
PHP
39 lines
1.0 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class CreateTableBanners extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('banners', function (Blueprint $table) {
|
|
$table->increments('id');
|
|
$table->string('name')->comment('名称');
|
|
$table->tinyInteger('type')->default(0)->comment('使用场景');
|
|
$table->string('thumb','255')->default(0)->comment('图片地址');
|
|
$table->string('url')->default('#')->comment('链接');
|
|
$table->smallInteger('sort')->default(0)->comment('排序');
|
|
$table->tinyInteger('is_checked')->default(1)->comment('审核1=通过,0=不通过,默认1');
|
|
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('banners');
|
|
}
|
|
}
|