const system=require("../../system");
const Dao=require("../dao.base");
class InvoiceApplyDao extends Dao{
  constructor(){
    super(Dao.getModelName(InvoiceApplyDao));
  }
  extraModelFilter(){
    return {"key":"include","value":[
      {model:this.db.models.order,attributes:["id","code","totalSum"]},

    ]};
  }
  extraWhere(obj,w,qc,linkAttrs){
    if(obj.codepath && obj.codepath!=""){
      if(obj.codepath.indexOf("myinvoiceapply")>0){
        w["createuser_id"]=obj.uid;
      }else{

      }
    }
    return w;
  }

}
module.exports=InvoiceApplyDao;
