generated from liutk/owl-admin-base
37 lines
1.1 KiB
PHP
37 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.
|
||
*/
|
||
public function up(): void
|
||
{
|
||
Schema::create('institutions', function (Blueprint $table) {
|
||
$table->id();
|
||
$table->string('name')->comment('名字');
|
||
$table->string('code')->nullable()->comment('简码');
|
||
$table->unsignedBigInteger('parent_id')->nullable()->default(0)->comment('上级');
|
||
$table->unsignedBigInteger('type_id')->nullable()->comment('属性:keywords.id');
|
||
$table->string('address')->nullable()->comment('地址');
|
||
$table->unsignedBigInteger('person_id')->nullable()->comment('负责人:persons.id');
|
||
$table->unsignedInteger('sort')->default(0)->comment('排序');
|
||
$table->string('remarks')->nullable()->comment('备注');
|
||
|
||
$table->timestamps();
|
||
});
|
||
}
|
||
|
||
/**
|
||
* Reverse the migrations.
|
||
*/
|
||
public function down(): void
|
||
{
|
||
Schema::dropIfExists('institutions');
|
||
}
|
||
};
|