id(); $table->string('name')->comment('部门名称'); $table->bigInteger('parent_id')->default(0)->comment('父部门ID'); $table->integer('sort')->default(0)->comment('显示顺序'); $table->bigInteger('leader_user_id')->nullable()->comment('负责人'); $table->string('phone')->nullable()->comment('联系电话'); $table->string('email')->nullable()->comment('邮箱'); $table->tinyInteger('status')->default(0)->comment('部门状态'); $table->string('creator', 64)->nullable()->comment('创建者'); $table->string('updater', 64)->nullable()->comment('更新者'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('system_departments'); } };