table('employee_medal', ['comment' => '员工勋章']) ->addColumn('root_id', 'integer', ['comment' => '店面id', 'null' => true,'default'=>0]) ->addColumn('employee_id', 'integer', ['comment' => '员工id','null' => true,'default'=>0]) ->addColumn('medal_id', 'integer', ['comment' => '勋章id','null' => true,'default'=>0]) ->addColumn('main', 'integer', ['comment' => '是否佩戴','null' => true,'default'=>0]) ->addColumn('type', 'string', ['limit'=> 255, 'comment'=> '类型', 'default'=> '','null' => true]) ->addColumn('addtime', 'timestamp', ['default'=> 'CURRENT_TIMESTAMP','null' => true]) ->create(); $this->table('medal', ['comment' => '勋章体系']) ->addColumn('title', 'string', ['limit'=> 255, 'comment'=> '勋章标题', 'default'=> '','null' => true]) ->addColumn('content', 'string', ['limit'=> 255, 'comment'=> '内容', 'default'=> '','null' => true]) ->addColumn('type', 'string', ['limit'=> 255, 'comment'=> '类型', 'default'=> '','null' => true]) ->addColumn('condition', 'integer', ['comment' => '达成条件','null' => true,'default'=>0]) ->addColumn('remark', 'string', ['limit'=> 255, 'comment'=> '备注', 'default'=> '','null' => true]) ->addColumn('path', 'string', ['limit'=> 255, 'comment'=> 'logo路径', 'default'=> '','null' => true]) ->addColumn('addtime', 'timestamp', ['default'=> 'CURRENT_TIMESTAMP','null' => true]) ->create(); } }