二次改版
This commit is contained in:
39
database/migrations/0000_00_00_000000_create_staff_table.php
Normal file
39
database/migrations/0000_00_00_000000_create_staff_table.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateStaffTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('staff', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('category_id')->index();
|
||||
$table->string('name')->comment('姓名');
|
||||
$table->string('cover')->nullable();
|
||||
$table->string('job')->comment('职位');
|
||||
$table->string('duty')->comment('职责');
|
||||
$table->text('content');
|
||||
$table->boolean('status')->default(0);
|
||||
$table->integer('order')->comment('排序')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('staff');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateLeadersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('leaders', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('category_id')->index();
|
||||
$table->string('title')->comment('标题');
|
||||
$table->string('cover')->nullable();
|
||||
$table->string('head')->comment('带头人');
|
||||
$table->string('reserve')->comment('后备带头人');
|
||||
$table->string('description')->nullable();
|
||||
$table->text('content');
|
||||
$table->boolean('status')->default(0);
|
||||
$table->integer('order')->comment('排序')->default(1);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('leaders');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user