table('hydraulic', ['engine' => 'InnoDB', 'collation' => 'utf8mb4_general_ci', 'comment' => '' ,'id' => 'id','signed' => true ,'primary_key' => ['id']]); //基础信息 $table->addColumn('number', 'string', ['limit' => 50,'null' => true,'signed' => true,'comment' => '编号',]) ->addColumn('department_id', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => true,'signed' => true,'comment' => '所属部门',]) ->addColumn('remark', 'string', ['limit' => 255,'null' => true,'signed' => true,'comment' => '备注',]) ->addColumn('alarm_state', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => true,'comment' => '告警状态',]) ->addColumn('net_state', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => false,'default' => 0,'signed' => true,'comment' => '网络状态',]) ->addColumn('online_time', 'integer', ['limit' => MysqlAdapter::INT_REGULAR,'null' => true,'default' => null,'signed' => true,'comment' => '在线时间',]) //液压泵规格信息 ->addColumn('max_pressure', 'string', ['limit' => 32,'null' => true,'signed' => true,'comment' => '最大压力',]) ->addColumn('min_pressure', 'string', ['limit' => 32,'null' => true,'signed' => true,'comment' => '最小压力',]) ->addColumn('longitude', 'decimal', ['precision' => 10,'scale' => 6,'null' => true,'signed' => true,'comment' => '经度',]) ->addColumn('latitude', 'decimal', ['precision' => 10,'scale' => 6,'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' => '软删除',]) ->create(); } }