place.go 443 B

12345678910111213141516171819202122232425
  1. package models
  2. import (
  3. "database/sql"
  4. "time"
  5. )
  6. type Place struct {
  7. ID uint64 `db:"id"`
  8. Title string `db:"title"`
  9. ParentID sql.NullInt64 `db:"parent_id"`
  10. CreatedAt time.Time `db:"created_at"`
  11. UpdatedAt time.Time `db:"updated_at"`
  12. }
  13. type AddPlaceRequest struct {
  14. Title string
  15. ParentID sql.NullInt64
  16. }
  17. type UpdatePlaceRequest struct {
  18. ID uint64
  19. Title string
  20. ParentID sql.NullInt64
  21. }