const system = require("../../../system");
const Dao = require("../../dao.base");
class TrademarkcaseDao extends Dao {
  constructor() {
    super(Dao.getModelName(TrademarkcaseDao));
  }
  extraWhere (qobj, qw, qc, linkAttrs) {
    // console.log("qobj", qobj)
    // console.log("qw", qw)
    // console.log("qc", qc)
    // console.log("linkarr", linkAttrs)
    console.log(qobj.bizpath)
    qc.order.unshift(['v_noticeDate', 'DESC'])
    switch (qobj.bizpath) {
      case '/dealaskfor/examine':
        qw.tradeStatus = '待审核'
        break
      case '/dealaskfor/refer':
        qw.tradeStatus = '申请递交中'
        break
      case '/myaskfor/pendingservice':
        qw.tradeStatus = '待完善材料'
        break
      case '/rejaskmanage/officalManager':
        qw.offical = { [this.db.Op.ne]: null }
        break
    }
    qc.raw = true;
    return qw;
  }
}
module.exports = TrademarkcaseDao;
