const system=require("../../../system");
const Dao=require("../../dao.base");
class ArticleDao extends Dao{
  constructor(){
    super(Dao.getModelName(ArticleDao));
  }
  orderBy(qobj) {
    //return {"key":"include","value":{model:this.db.models.app}};
    if(!qobj.orderInfo || qobj.orderInfo.length==0){
      return [["created_at", "ASC"]];
    }else{
      return qobj.orderInfo;
    }
  }
  
}
module.exports=ArticleDao;
    // var u=new UserDao();
    // var roledao=system.getObject("db.roleDao");
    // (async ()=>{
    //   var users=await u.model.findAll({where:{app_id:1}});
    //   var role=await roledao.model.findOne({where:{code:"guest"}});
    //   console.log(role);
    //   for(var i=0;i<users.length;i++){
    //     await users[i].setRoles([role]);
    //     console.log(i);
    //   }
    //
    // })();
