thing.go 597 B

123456789101112131415161718192021222324252627282930313233
  1. package models
  2. import "time"
  3. type Thing struct {
  4. ID uint64 `db:"id"`
  5. PlaceID uint64 `db:"place_id"`
  6. Title string `db:"title"`
  7. Description string `db:"description"`
  8. CreatedAt time.Time `db:"created_at"`
  9. UpdatedAt time.Time `db:"updated_at"`
  10. }
  11. type AddThingRequest struct {
  12. Title string
  13. Description string
  14. }
  15. type UpdateThingRequest struct {
  16. ID uint64
  17. Title string
  18. Description string
  19. }
  20. type AddPlaceThingRequest struct {
  21. PlaceID uint64
  22. ThingID uint64
  23. }
  24. type UpdatePlaceThingRequest struct {
  25. ThingID uint64
  26. PlaceID uint64
  27. }