table('designer_collection_works', ['comment' => '设计师作品集(字段名基本跟material_case表保持一致,以方便跟案例打通)', 'engine'=>'InnoDB']); $table->addColumn('title', 'string',array('limit' => 255, 'comment'=>'作品名称')) ->addColumn('community_id', 'integer',array('limit' => 10,'comment'=>'小区id','default'=>0)) ->addColumn('designer_id', 'integer',array('limit' => 10,'comment'=>'设计师id','default'=>0)) ->addColumn('housetype_id', 'integer',array('limit' => 10,'comment'=>'户型','default'=>0)) ->addColumn('style_id', 'integer',array('limit' => 10,'comment'=>'风格','default'=>0)) ->addColumn('cover_img', 'string',array('limit' => 255, 'comment'=>'封面图片','null' => true)) ->addColumn(Column::decimal('square',6)->setComment('面积')->setDefault(0)) ->addColumn(Column::decimal('money',7)->setComment('价格')->setDefault(0)) ->addColumn(Column::tinyInteger('type')->setComment('作品类型1图片,2VR链接')->setDefault(1)) ->addColumn('desc', 'text',array('comment'=>'内容,图片地址','null' => true)) ->addColumn('vr_case', 'text',array('comment'=>'VR案例','null' => true)) ->addColumn('root_id', 'integer', array('default' => 0, 'comment'=>'所属企业')) ->addColumn('employee_id', 'integer',array('default' => 0, 'comment'=>'设计师ID')) ->addColumn(Column::tinyInteger('status')->setComment('作品当前状态')->setDefault(0)) ->addColumn('addtime', 'timestamp',array('comment'=>'添加时间','default'=> 'CURRENT_TIMESTAMP')) ->create(); } }