package models import "github.com/uptrace/bun" type Location struct { bun.BaseModel `bun:"table:locations"` ID int `bun:"id,pk,autoincrement" json:"id"` Street string `bun:"street,notnull,unique:location" json:"street"` City string `bun:"city,notnull,unique:location" json:"city"` PostalCode string `bun:"postal_code,notnull,unique:location" json:"postalCode"` Latitude *float64 `bun:"latitude" json:"latitude,omitempty"` Longitude *float64 `bun:"longitude" json:"longitude,omitempty"` Events *[]Event `bun:"-" json:"events,omitempty"` }