Skip to content

Commit

Permalink
refactor: set address, distinction, location columns as non-nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
ngshiheng committed Jun 6, 2024
1 parent b991a34 commit 8903e8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/michelin/restaurant.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import "time"

// Restaurant stores information about a restaurant on Michelin Guide.
type Restaurant struct {
Address string
Address string `gorm:"not null"`
Cuisine string
Description string
Distinction string `gorm:"index:idx_distinction"`
Distinction string `gorm:"not null;index:idx_distinction"`
FacilitiesAndServices string // Comma-separated string
GreenStar bool
Location string `gorm:"index:idx_location"`
Location string `gorm:"not null;index:idx_location"`
Latitude string
Longitude string
Name string `gorm:"not null;index:idx_name"`
Expand Down

0 comments on commit 8903e8b

Please sign in to comment.