models.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // Code generated by sqlc. DO NOT EDIT.
  2. package ondeck
  3. import (
  4. "database/sql"
  5. "fmt"
  6. "time"
  7. )
  8. type VenuesStatus string
  9. const (
  10. VenuesStatusOpen VenuesStatus = "open"
  11. VenuesStatusClosed VenuesStatus = "closed"
  12. )
  13. func (e *VenuesStatus) Scan(src interface{}) error {
  14. switch s := src.(type) {
  15. case []byte:
  16. *e = VenuesStatus(s)
  17. case string:
  18. *e = VenuesStatus(s)
  19. default:
  20. return fmt.Errorf("unsupported scan type for VenuesStatus: %T", src)
  21. }
  22. return nil
  23. }
  24. type City struct {
  25. Slug string `json:"slug"`
  26. Name string `json:"name"`
  27. }
  28. // Venues are places where muisc happens
  29. type Venue struct {
  30. ID int64 `json:"id"`
  31. // Venues can be either open or closed
  32. Status VenuesStatus `json:"status"`
  33. Statuses sql.NullString `json:"statuses"`
  34. // This value appears in public URLs
  35. Slug string `json:"slug"`
  36. Name string `json:"name"`
  37. City string `json:"city"`
  38. SpotifyPlaylist string `json:"spotify_playlist"`
  39. SongkickID sql.NullString `json:"songkick_id"`
  40. Tags sql.NullString `json:"tags"`
  41. CreatedAt time.Time `json:"created_at"`
  42. }