table('flange', ['engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '法兰' ,'id' => 'id','signed' => true ,'primary_key' => ['id']]); $table->addColumn('number', 'string', ['limit' => 50,'null' => false,'default' => '','signed' => true,'comment' => '编号',]) ->addColumn('model', 'string', ['limit' => 50,'null' => false,'default' => '','signed' => true,'comment' => '型号',]) ->addColumn('department_id', 'string', ['limit' => 11,'null' => true,'signed' => true,'comment' => '所属部门',]) ->addColumn('name', 'string', ['limit' => 50,'null' => true,'signed' => true,'comment' => '名称',]) ->addColumn('is_used', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => -1,'signed' => true,'comment' => '使用状态 1已使用 -1未使用 -2废弃',]) ->addColumn('brand', 'string', ['limit' => 50,'null' => true,'signed' => true,'comment' => '品牌',]) ->addColumn('supplier', 'string', ['limit' => 50,'null' => true,'signed' => true,'comment' => '供应商',]) ->addColumn('out_date', 'date', ['null' => true,'signed' => true,'comment' => '出厂日期',]) ->addColumn('remark', 'string', ['limit' => 255,'null' => true,'signed' => true,'comment' => '注释',]) ->addColumn('torque', 'string', ['limit' => 10,'null' => true,'signed' => true,'comment' => '扭矩',]) ->addColumn('stress', 'string', ['limit' => 10,'null' => true,'signed' => true,'comment' => '压力',]) ->addColumn('fastening_scheme', 'string', ['limit' => 255,'null' => true,'signed' => true,'comment' => '紧固方案',]) ->addColumn('fan_id', 'string', ['limit' => 11,'null' => true,'signed' => true,'comment' => '风机id',]) ->addColumn('install_position', 'string', ['limit' => 20,'null' => true,'signed' => true,'comment' => '安装位置',]) ->addColumn('fastening_information', 'string', ['limit' => 255,'null' => true,'signed' => true,'comment' => '紧固信息',]) ->addColumn('maintenance_information', 'string', ['limit' => 255,'null' => true,'signed' => true,'comment' => '维护信息',]) ->addColumn('creator_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '创建人ID',]) ->addColumn('created_at', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '创建时间',]) ->addColumn('updated_at', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '更新时间',]) ->addColumn('deleted_at', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => false,'comment' => '软删除',]) ->addIndex(['torque'], ['name' => 'fulltext_torque','type' => 'fulltext']) ->create(); } }