id('id')->unsigned()->comment('编号'); $table->string('mid', 16)->comment('唯一标识符'); // 随机 $table->bigInteger('assemble_id')->comment('集合id'); $table->string('title', 255)->comment('标题,中文注释'); // 中文注释 $table->string('code', 255)->comment('字段名称,英文'); $table->string('type', 255)->comment('字段类型'); $table->integer('length')->nullable()->comment('字段长度'); $table->integer('decimal')->nullable()->comment('浮点数精度'); $table->tinyInteger('is_null')->nullable()->default(0)->comment('是否可以为空 1是 0否'); $table->tinyInteger('is_unsigned')->nullable()->default(0)->comment('是否为无符号类型 1是 0否'); $table->string('default', 500)->nullable()->default('')->comment('默认值'); $table->string('remark', 500)->nullable()->comment('备注'); // 备注 $table->decimal('weight')->unsigned()->nullable()->default(0)->comment('权重,用于排序'); $table->tinyInteger('is_delete')->unsigned()->default(0)->comment('是否删除 1是'); $table->bigInteger('created_at', false)->unsigned()->comment('创建时间,时间戳'); $table->bigInteger('updated_at', false)->unsigned()->comment('更新时间,时间戳'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('sys_assemble_column'); } };