Files
wh-api/migrations/2025_06_05_161808_create_first_company_table.php
ykxiao 0b2299c427
Some checks failed
Build Docker / build (push) Has been cancelled
协程版仓库后端项目
2025-07-08 14:59:47 +08:00

43 lines
1.7 KiB
PHP
Executable File

<?php
use App\Service\MigrateService;
use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('first_company', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('domain', 100)->comment('公司域名');
$table->string('name', 60)->comment('公司简称');
$table->string('full_name', 255)->default('')->comment('公司全称');
$table->string('address', 255)->default('')->comment('公司地址');
$table->string('company_type', 20)->default('')->comment('公司类型');
$table->string('logo', 255)->default('')->comment('公司LOGO');
$table->string('org_code', 64)->default('')->comment('公司营业执照编号');
$table->string('owner', 45)->default('')->comment('公司法人');
$table->string('id_card', 18)->default('')->comment('公司法人身份证');
$table->char('mobile', 11)->default('')->comment('负责人手机');
$table->integer('activation_date')->default(0)->unsigned()->comment('启用时间');
$table->tinyInteger('active_status')->default(1)->comment('状态: 0禁用 1正常');
$table->string('remark', 255)->default('')->comment('备注信息');
MigrateService::migrateCreateInfo($table);
$table->comment('平台公司信息');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('first_company');
}
};