Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actor ¶
type Address ¶
type Address struct {
AddressId int `grom:"primaryKey" json:"address_id,omitempty"`
Address string `json:"address,omitempty"`
Address2 string `json:"address2,omitempty"`
District string `json:"district,omitempty"`
CityId int `json:"-"`
City *Cities `gorm:"foreignKey:CityId;references:CityId" json:"city,omitempty"`
PostalCode string `json:"postal_code,omitempty"`
Phone string `json:"phone,omitempty"`
LastUpdate time.Time `json:"-"`
}
type Category ¶
type Cities ¶
type Countries ¶
type Film ¶
type Film struct {
FilmId int `gorm:"primaryKey" json:"id"`
Title string `json:"title"`
Description string `json:"description,omitempty"`
ReleaseYear Year `json:"release_year,omitempty"`
LanguageId int `json:"-"`
Language *Languages `gorm:"foreignKey:LanguageId;references:LanguageId" json:"laguage,omitempty"`
OriginalLanguageId int `json:"-"`
OriginalLanguage *Languages `gorm:"foreignKey:OriginalLanguageId;references:LanguageId" json:"original_laguage,omitempty"`
RentalDuration int `json:"rental_duration"`
RentalRate decimal.Decimal `json:"rental_rate"`
Length int `json:"length,omitempty"`
ReplacementCost decimal.Decimal `json:"replacement_cost"`
Rating FilmRating `json:"rating,omitempty"`
SpecialFeatures SpecialFeatures `json:"special_features,omitempty"`
Actors []*Actor `gorm:"many2many:film_actor;joinForeignKey:film_id;" json:"actors,omitempty"`
LastUpdate time.Time `json:"-"`
}
type FilmActor ¶
type FilmCategory ¶
type FilmCategory struct {
FilmId int `gorm:"primaryKey"`
CategoryId string `gorm:"primaryKey"`
LastUpdate time.Time
}
func (FilmCategory) TableName ¶
func (FilmCategory) TableName() string
type FilmRating ¶
type FilmRating string
const ( RatingG FilmRating = "G" RatingPG FilmRating = "PG" RatingPG13 FilmRating = "PG-13" RatingNC17 FilmRating = "NC-17" )
type Inventory ¶
type JSON ¶
type JSON json.RawMessage
type Languages ¶
type Payment ¶
type Rental ¶
type SpecialFeatures ¶
type SpecialFeatures string
const ( FeatureTrailer SpecialFeatures = "Trailers" FeatureCommentary SpecialFeatures = "Commentaries" FeatureDeletedScene SpecialFeatures = "Deleted Scenes" FeatureBehindtheScene SpecialFeatures = "Behind the Scenes" )
type Staff ¶
type Staff struct {
StaffId int `gorm:"primaryKey" json:"staff_id"`
FirstName string `json:"first_name,omitempty"`
LastName string `json:"last_name,omitempty"`
AddressId int `json:"address_id,omitempty"`
Address *Address `gorm:"foreignKey:AddressId;references:AddressId" json:"address,omitempty"`
StoreId int `json:"-"`
Store *Store `gorm:"foreignKey:StoreId;references:StoreId"`
Email string `json:"email,omitempty"`
Active int `json:"active,omitempty"`
Username string `json:"username,omitempty"`
Password string `json:"-"`
Picture []byte `json:"-"`
LastUpdate time.Time `json:"-"`
}
type Store ¶
type Store struct {
StoreId int `gorm:"primaryKey" json:"store_id"`
ManagerStaffId int `json:"-"`
ManagerStaff *Staff `gorm:"foreignKey:ManagerStaffId;references:StaffId" json:"manger_staff,omitempty"`
AddressId int `json:"-"`
Address *Address `gorm:"foreignKey:AddressId;references:AddressId" json:"address,omitempty"`
LastUpdate time.Time `json:"-"`
}
Click to show internal directories.
Click to hide internal directories.