const system=require("../../../system");
const Dao=require("../../dao.base");
class LoopplayDao extends Dao{
  constructor(){
    super(Dao.getModelName(LoopplayDao));
  }
  // channelCode: ""
  // extraModelFilter(){
  //   return {"key":"include","value":[{model:this.db.models.newschannel,attributes:["id","title"]},]};
  // }
  extraWhere(obj, w){
    let channelCode = obj.channelCode || '';
    if(channelCode == "index") {
      w["channelCode"] = '';
    } else if(channelCode) {
      w["channelCode"] = channelCode;
    }
    // if(pageType == 1) {
    //   w["status"] = {[this.db.Op.in]: ['1']};
    // } else if (pageType == 2) {
    //   w["status"] = {[this.db.Op.in]: ['2']};
    // } else if (pageType == 3) {
    //   w["status"] = {[this.db.Op.in]: ['4','8','16']};
    // }
    return w;
  }
  orderBy(){
    //return {"key":"include","value":{model:this.db.models.app}};
    return [["orderNo","ASC"]];
  }
}
module.exports=LoopplayDao;
