add datamodel ; check if zipcode is participating

This commit is contained in:
GotPPay
2018-05-18 21:38:17 +02:00
parent 78d6a45ebb
commit d6301ebbf3
3 changed files with 4 additions and 4 deletions

View File

@@ -122,7 +122,10 @@ func Instance(cfg *config.Config) (contract.DataManager, error) {
instance.profile = newProfileRepo(db)
instance.organization = newOrganizationRepo(db)
instance.zipcodes = newZipcodeRepo(db)
<<<<<<< HEAD
instance.plan = newPlanRepo(db)
=======
>>>>>>> add datamodel ; check if zipcode is participating
})
return instance, connErr

View File

@@ -62,4 +62,4 @@ func (c *zipcodeRepo) GetAll() ([]entity.Zipcode, error) {
func (c *zipcodeRepo) GetByParticipatingZipcode(zipcode string) (entity.Zipcode, error) {
return c.parseEntity(c.conn.QueryRow(c.getQuery()+"WHERE a.participating = 1 AND a.zipcode = ?", zipcode))
}
}