const system=require("../../../system");
const Dao=require("../../dao.base");
class PmFollowDao extends Dao{
  constructor(){
    super(Dao.getModelName(PmFollowDao));
  }
  extraModelFilter(){
    return {
      "key":"include","value":[
        {model:this.db.models.user,as:"follower"},
        {model:this.db.models.pmproject},
      ]
    };
  }
    extraWhere(obj,w,qc,linkAttrs){
      if(obj.codepath && obj.codepath!=""){
        if(obj.codepath.indexOf("my")>0){//说明是应用管理员的查询
          console.log(obj);
          w["follower_id"]=obj.uid;
        }
      }
  }
}
module.exports=PmFollowDao;
