diff --git a/internal/types/shelves.go b/internal/types/shelves.go index 1fabb4e..efef07f 100644 --- a/internal/types/shelves.go +++ b/internal/types/shelves.go @@ -12,7 +12,7 @@ import ( type ShelfLocation struct { ID uint64 `gorm:"primarykey" json:"id"` - Name string `json:"name"` + Name string `gorm:"index:unique" json:"name"` RoomNumber string `json:"room_number,omitempty"` Description string `json:"description,omitempty"` BuildingID uint64 `json:"-"`