table('enterprise_news', array('id' => true, 'primary_key' => ['id'], 'engine' => 'InnoDB', 'comment' => '官网新闻')); $table->addColumn('title', 'string',array('limit' => 255,'default'=>'','comment'=>'标题')) ->addColumn('admin_id', 'integer',array('limit' => 10,'signed' => false, 'default' => 0,'comment'=>'发布人')) ->addColumn('update_admin_id', 'integer',array('limit' => 10,'signed' => false, 'default' => 0,'comment'=>'更新人')) ->addColumn('pub_status', 'integer',array('limit' => 10,'signed' => false, 'default' => 0,'comment'=>'发布状态0:发布中,1:已下线')) ->addColumn('is_top', 'integer',array('limit' => 10,'signed' => false, 'default' => 0,'comment'=>'是否推荐到首页0:否,1:是')) ->addColumn('sources', 'string',array('limit' => 255,'default'=>'','comment'=>'来源')) ->addColumn('author', 'string',array('limit' => 36,'default'=>'','comment'=>'作者')) ->addColumn('keywords', 'string',array('limit' => 255,'default'=>'','comment'=>'关键字')) ->addColumn('desc', 'string',array('limit' => 255,'default'=>'','comment'=>'描述')) ->addColumn('thumb_img', 'integer',array('limit' => 10,'signed' => false,'default'=>0,'comment'=>'缩略图')) ->addColumn('contents', 'text',array('comment'=>'富文本内容')) ->addColumn('is_delete', 'integer',array('limit' => 4, 'signed' => false, 'default'=> 0,'comment'=>'是否删除0:可用,1:禁用')) ->addColumn('create_time', 'integer', array('limit' => 10,'signed' => false, 'default' => 0, 'comment' => '创建时间')) ->addColumn('update_time', 'integer', array('limit' => 10,'signed' => false, 'default' => 0, 'comment' => '更新时间')) ->create(); } }