exports.DefaultHttpHeader = class DefaultHttpHeader {

    constructor() {
      this.fields = [
        ['Authorization', 'Users unique access-key.'],
      ];
    }

};

exports.ReqHead = class ReqHead {

    constructor() {
      this.fields = [
        ['account_id', 0, '账号id'],
        ['session_id', '', '会话id'],
      ];
    }

};

exports.RspHead = class RspHead {

    constructor() {
      this.fields = [
        ['code', 0, '错误码/0 成功；1 失败'],
        ['message', '', '错误描述'],
      ];
    }

};

exports.StreamPagination = class StreamPagination {
    constructor() {
      this.fields = [
        ['next_cursor', '', '下一页游标'],
        ['previous_cursor', '', '上一页游标'],
        ['remaining', 0, '剩余条数'],
      ];
    }
};

exports.Attachment = class {

    constructor() {
      this.fields = [
        ['itemid', 0, '道具id'],
        ['itemnum', 0, '道具数量'],
      ];
    }

};

exports.Mail = class {

    constructor() {
      this.fields = [
        ['mail_id', '', '邮件唯一id'],
        ['mail_type', '', '邮件类型'],
        ['subject', '', '邮件标题'],
        ['content', '', '邮件内容'],
        ['!recipients', '', '收件人列表'],
        ['!attachments', Attachment(), '邮件附件'],
        ['deleted', 0, '是否已删除'],
        ['sendtime', 0, '发送时间'],
        ['user_reg_start_time', 0, '用户注册开始时间'],
        ['user_reg_end_time', 0, '用户注册结束时间'],
        ['expiretime', 0, '邮件过期时间'],
        ['createtime', 0, '邮件创建时间'],
        ['modifytime', 0, '邮件修改时间'],
      ];
    }

};

exports.UserGroup = class {

    constructor() {
      this.fields = [
        ['group_id', '', '组id'],
        ['group_name', '', '组名'],
        ['group_desc', '', '描述'],
        ['enabled', 0, '是否已启用'],
        ['deleted', 0, '是否已删除'],
        ['createtime', 0, '创建时间'],
        ['modifytime', 0, '修改时间'],
      ];
    }

};

exports.UserGroupMember = class {

    constructor() {
      this.fields = [
        ['group_id', '', '组id'],
        ['member_id', '', '成员id'],
        ['deleted', 0, '是否已删除'],
        ['createtime', 0, '创建时间'],
        ['modifytime', 0, '修改时间'],
      ];
    }

};

exports.Player = class {
  constructor()
  {
    this.fields = [
      ['idx',0,''],
      ['account_id', '', '用户id'],
      ['channel', '', '渠道id'],
      ['name', '', '用户名'],
      ['sex', 0, '性别'],
      ['head_id', 0, '头像id'],
      ['head_frame', 0, '头像框id'],
      ['level', 0, '等级'],
      ['exp', 0, '经验'],
      ['rank', 0, '段位'],
      ['history_best_rank', 0, '历史最高段位'],
      ['score', 0, '积分'],
      ['history_best_score', 0, '历史最高积分'],
      ['elo', 0, '隐藏elo积分'],
      ['bceg', 0, '治理代币'],
      ['gold', 0, '金币'],
      ['diamond', 0, '钻石'],
      ['hero_id', 0, '当前上阵英雄id'],
      ['first_fight', 0, '是否首战'],
      ['last_season_id', 0, '最后一次赛季id'],
      ['activated', 0, '是否已激活'],
      ['rename_count', 0, '改名次数'],
      ['activatetime', 0, '激活时间'],
      ['already_guide', 0, '已引导'],
      ['pve_instance_id', 0, '已过pve副本id'],
      ['like_count', 0, '被点赞次数'],
      ['head_list', [], '拥有的头像列表'],
      ['head_frame_list', [], '拥有的头像框列表'],
      ['consume_gold', 0, '消费金币数'],
      ['score_modifytime', 0, '积分修改时间'],
      ['best_rank_modifytime', 0, 'bestrank修改时间'],
      ['createtime', 0, '创建时间'],
      ['last_login_time', 0, '上次登录时间'],
      ['is_gain_item', 0, '是否获取免费item道具'],
      ['guild_id', '', '工会id'],
      ['guild_job', 0, '工会职位'],
      ['guild_name', '', '工会名称'],
      ['ring_id', 0, '戒指id'],
      ['parachute', 0, '降落伞id'],
      ['star_num', 0, '星星数(成长任务)'],
      ['address', '', '钱包地址'],
    ]
  }
}

exports.BagItem = class {
  constructor()
  {
    this.fields = [
      ['idx', 0, ''],
      ['token_id', '', 'token_id'],
      ['account_id', '', '用户id'],
      ['item_id', 0, '物品id'],
      ['item_num', 0, '物品数量'],
      ['rand_attr', '', '随机属性'],
      ['today_get_gold', 0, '今日获得金币'],
      ['last_get_gold_time', 0, '最后获得金币时间'],
      ['createtime', 0, '创建时间'],
      ['modifytime', 0, '修改时间'],
      ['is_old', 0, '0:展示红点 1:不用展示'],
    ]
  }
}

exports.Hero = class {
  constructor()
  {
    this.fields = [
      ['idx', 0, ''],
      ['token_id', '', 'token_id'],
      ['account_id', '', '用户id'],
      ['hero_id', 0, '英雄id'],
      ['hero_tili', '', '英雄体力'],
      ['state', 0, '0：已购买 1：体验中'],
      ['skin_id', 0, '皮肤id'],
      ['hero_lv', 0, '英雄等级'],
      ['quality', 0, '品阶'],
      ['skill_lv1', 0, '必杀技等级'],
      ['skill_lv2', 0, '躲避技能等级'],
      ['try_count', 0, '剩余体验次数 当state=1时才有意义'],
      ['advanced_count', 0, '进阶次数'],
      ['lock_type', 0, '0:无锁 1:升级 2:升阶 3:悬赏'],
      ['unlock_time', 0, '解锁时间'],
      ['unlock_trade_time', 0, '出售解锁时间'],
      ['rand_attr', '', '随机属性'],
      ['today_pve_get_ceg', 0, '今日获得金币'],
      ['last_pve_get_ceg_time', 0, '最后获得金币时间'],
      ['today_mission_get_ceg', 0, '悬赏任务获得金币'],
      ['last_mission_get_ceg_time', 0, '最后获得悬赏任务金币时间'],
      ['createtime', 0, '创建时间'],
      ['modifytime', 0, '修改时间'],
      ['chip_ids', '', '已镶嵌的芯片idx组'],
      ['skill_common', '', '通用技能'],
      ['skill_points', 0, '技能点'],
      ['labour', 0, '劳力值'],
      ['active_token_id', '', 'active_token_id'],
      ['active_count', 0, 'active_count'],
      ['active', 0, '是否激活 1：已初始激活'],
      ['wealth_attr', 0, '财富值属性'],      
      ['active_time', 0, '激活时间'],
      ['seal_type', 0, '0:未封存 1：已封存'],
      ['unseal_time', 0, '解封时间'],
      ['is_old', 0, '0:展示红点 1:不用展示'],
      ['on_chain_time', 0, '上链时间'],
    ]
  }
}

exports.Order = class {
  constructor()
  {
    this.fields = [
      ['idx', 0, ''],
      ['order_id', '', '订单id'],
      ['chain', '', 'chain'],
      ['status', '', 'status'],
      ['net_id', 0, 'net_id'],
      ['token_id', '', 'token_id'],
      ['contract_address', '', 'contract_address'],
      ['item_id', 0, 'item_id'],
      ['hero_quality', 0, 'hero_quality'],
      ['price', '', 'price'],
      ['start_time', 0, 'start_time'],
      ['end_time', 0, 'end_time'],
      ['created_at', 0, 'created_at'],
      ['updated_at', 0, 'updated_at'],
      ['event_id', '', '事件id'],
      ['event_data', '', '事件内容'],
      ['createtime', 0, '创建时间'],
      ['modifytime', 0, '修改时间'],
      ['src_price_exchange_rate', 0, 'src_price_exchange_rate'],
      ['src_price_amount', '', 'src_price_amount'],
      ['src_price_item_type', '', 'src_price_item_type'],
      ['src_price_contract_address', '', 'src_price_contract_address'],
      ['price_len', 0, 'price_len'],
    ]
  }
}

exports.Sale = class {
  constructor()
  {
    this.fields = [
      ['idx', 0, ''],
      ['order_id', '', '订单id'],
      ['chain', '', 'chain'],
      ['net_id', 0, 'net_id'],
      ['token_id', '', 'token_id'],
      ['contract_address', '', 'contract_address'],
      ['buyer', '', 'buyer'],
      ['seller', '', 'seller'],
      ['item_id', 0, 'item_id'],
      ['hero_quality', 0, 'hero_quality'],
      ['price', '', 'price'],
      ['indexed_at', 0, 'indexed_at'],
      ['event_id', '', '事件id'],
      ['event_data', '', '事件内容'],
      ['createtime', 0, '创建时间'],
      ['modifytime', 0, '修改时间'],
    ]
  }
}

exports.NFT = class {
  constructor()
  {
    this.fields = [
      ['idx', 0, ''],
      ['owner_address', '', 'owner_address'],
      ['creator_address', '', 'creator_address'],
      ['token_id', '', 'token_id'],
      ['token_type', 0, 'nft类型 1:英雄 2:枪支 3:芯片 6:荣誉 7:徽章'],
      ['token_state', 0, '0:正常状态 1:出售中 2:出租中'],
      ['item_id', 0, '道具id'],
      ['deleted', 0, 'deleted'],
      ['confirm_count', 0, 'confirm_count'],
      ['confirm_block_number', 0, 'confirm_block_number'],
      ['tags', '', 'tags'],
      ['net_id', 0, 'net_id'],
      ['contract_address', '', 'contract_address'],
      ['createtime', 0, '创建时间'],
      ['modifytime', 0, '修改时间'],
      ['last_owner_address', '', 'last_owner_address'],
    ]
  }
}
