const system=require("../../system");
const ServiceBase=require("../sve.base")
const settings=require("../../../config/settings")
class UserAddrService extends ServiceBase{
  constructor(){
     super(ServiceBase.getDaoName(UserAddrService));
    }
  //获取当前登录人所有地址
  async fetchAllAddress(companyid,userid) {
    var u = await this.dao.model.findAll({
      where:{company_id: companyid ,createuser_id: userid},
      attributes:["id", "name", "mobile", "email", "address","isDefault","company_id"]
    }); 
    return u;
  }
}
module.exports=UserAddrService;
