2
0

location.go 580 B

123456789101112131415161718192021222324
  1. package db
  2. import (
  3. "github.com/gshopify/service-wrapper/model"
  4. "gshopper.com/gshopify/shop/cache"
  5. "time"
  6. )
  7. var (
  8. locationSelection = func(ln model.LanguageCode) []string {
  9. return append([]string{
  10. "id", "created_at", "updated_at", "deleted_at",
  11. "address_1", "address_2", "city", "country", "country_code",
  12. "province", "province_code", "zip", "phone",
  13. "latitude", "longitude",
  14. }, ln.SqlFieldSelection("name"))
  15. }
  16. locationKey = func(clause string, args ...any) *cache.SqlKey {
  17. return cache.NewSQLKey(
  18. "location",
  19. time.Minute,
  20. clause, args...)
  21. }
  22. )