r3testing

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2026 License: MIT Imports: 1 Imported by: 0

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

type ArtistToEvent struct {
	ArtistID int64 `gorm:"primaryKey"`
	EventID  int   `gorm:"primaryKey"`
}

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.

type Location

type Location struct {
	ID         int64 `gorm:"primaryKey"`
	Name       string
	Slug       string
	CityID     int64
	Popularity int
	Visible    bool

	City         *City                 `gorm:"foreignKey:CityID"`
	Translations []LocationTranslation `gorm:"foreignKey:LocationID"`
}

Location represents a location that belongs to a city.

type LocationTranslation

type LocationTranslation struct {
	ID         int64 `gorm:"primaryKey"`
	Name       string
	Slug       string
	LocationID int64  // Foreign key to Location.ID
	Locale     string // e.g., "en", "es", "de"
}

LocationTranslation stores the translated name and slug for a Location.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL