Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Artist ¶
type Artist struct {
ID int64 `gorm:"primaryKey"`
Name string
// Add more fields as needed (e.g., Bio, Genre, etc.)
Translations []ArtistTranslation `gorm:"foreignKey:ArtistID"`
}
Artist represents a person who performs at events.
type ArtistToEvent ¶
ArtistToEvent represents the many-to-many relationship between artists and events.
type ArtistTranslation ¶
type ArtistTranslation struct {
ID int64 `gorm:"primaryKey"`
Name string
ArtistID int64 // Foreign key to Artist.ID
Locale string // e.g., "en", "es", "de"
}
ArtistTranslation stores the translated name for an Artist.
type City ¶
type City struct {
ID int64 `gorm:"primaryKey"`
Name string
CountryName string
Popularity int
// Association: one-to-many with CityTranslation
Translations []CityTranslation `gorm:"foreignKey:CityID"`
}
City represents a geographical city.
type CityTranslation ¶
type CityTranslation struct {
ID int64 `gorm:"primaryKey"`
Name string
CityID int64 // Foreign key to City.ID
Locale string // e.g., "en", "es", "de"
}
CityTranslation stores the translated name for a City.
type Event ¶
type Event struct {
ID int64 `gorm:"primaryKey"`
HappenedAt time.Time
Name string
Weight int
LocationID int64 `gorm:"column:venue_id"` // DB column is venue_id
Active bool
Location *Location `gorm:"foreignKey:LocationID"`
Artists []Artist `gorm:"many2many:artist_to_events"`
Translations []EventTranslation `gorm:"foreignKey:EventID"`
}
Event represents an event associated with a location.
type EventTranslation ¶
type EventTranslation struct {
ID int64 `gorm:"primaryKey"`
Name string
EventID int64 // Foreign key to Event.ID
Locale string // e.g., "en", "es", "de"
}
EventTranslation stores the translated name for an Event.
Click to show internal directories.
Click to hide internal directories.