Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var TicketMappings = map[TicketCode]TicketType{ "0AQ": WeeklyStd, "0AS": WeeklyStd, "7DS": WeeklyStd, "7TS": WeeklyZ16TCStd, }
Functions ¶
This section is empty.
Types ¶
type FareDetail ¶
type FareDetail struct { gorm.Model FlowID uint `header:"flowId"` TicketCode string `header:"ticket_code"` Fare uint `header:"fare"` RestrictionCode string `header:"restriction_code"` // LEFT JOINed from ticket_type TicketDescription string `header:"tkt_desc"` TicketClass uint `header:"tkt_class"` TicketType string `header:"tkt_type"` // LEFT JOINed from restriction_header RestrictionDesc string `header:"restriction_desc"` RestrictionDescOut string `header:"restriction_desc_out"` RestrictionDescRtn string `header:"restriction_desc_rtn"` }
FareDetail contains the base of FareData, with additional columns LEFT JOINed from ticket_type table
type FareDetailExtreme ¶
type FareDetailExtreme struct { gorm.Model FlowID uint `header:"flow_id"` OriginCode string `header:"origin_code"` OriginName string `header:"origin_name"` DestinationCode string `header:"destination_code"` DestinationName string `header:"destination_name"` RouteCode string `header:"route_code"` RouteDesc string `header:"route_desc"` RouteAaaDesc string `header:"route_aaa_desc"` StatusCode string `header:"status_code"` UsageCode string `header:"usage_code"` TOC string `header:"toc"` FareID string `header:"fare_id"` TicketCode string `header:"ticket_code"` TicketDesc string `header:"tkt_desc"` TicketClass uint `header:"tkt_class"` TicketType string `header:"tkt_type"` AdultFare uint `header:"adult_fare"` ChildFare uint `header:"child_fare"` RestrictionCode string `header:"restriction_code"` RestrictionDesc string `header:"restriction_desc"` }
FareDetailExtreme has all the fields I think we'll need to hit the db just once
type FlowData ¶
type FlowData struct { gorm.Model FlowID string OriginCode string DestinationCode string RouteCode string Direction string StartDate *time.Time EndDate *time.Time }
FareData maps directly to records in the flow table
type FlowDetail ¶
type LocationData ¶
type LocationData struct { gorm.Model UIC string `gorm:"column:uic"` NLC string CRS string FareGroup string Description string StartDate *time.Time EndDate *time.Time }
LocationData represents the records in location table
func (LocationData) TableName ¶
func (LocationData) TableName() string
type LocationGroup ¶
LocationGroup contains fields pulled from the subquery method
type LocationGroupData ¶
type LocationGroupData struct { gorm.Model GroupUICCode string Description string ERSCountry string ERSCode string StartDate *time.Time EndDate *time.Time QuoteDate *time.Time }
func (LocationGroupData) TableName ¶
func (LocationGroupData) TableName() string
type LocationGroupMemberData ¶
type LocationGroupMemberData struct { gorm.Model GroupUICCode string MemberUICCode string MemberCRSCode string StartDate *time.Time EndDate *time.Time }
func (LocationGroupMemberData) TableName ¶
func (LocationGroupMemberData) TableName() string
type LocationWithGroupData ¶
type LocationWithGroupData struct { gorm.Model UIC string `gorm:"column:uic"` NLC string CRS string FareGroup string Description string StartDate *time.Time EndDate *time.Time GroupUicCode string GroupDescription string }
LocationWithGroupData is the record the subquery method retrieves back
type LocationWithGroups ¶
type LocationWithGroups struct { UIC string NLC string CRS string FareGroup string Description string StartDate *time.Time EndDate *time.Time Groups []*LocationGroup }
LocationWithGroups is a flattened struct from LocationWithGroupData
func (LocationWithGroups) IsGroupedStation ¶
func (l LocationWithGroups) IsGroupedStation() bool
type TicketCode ¶
type TicketCode string
Click to show internal directories.
Click to hide internal directories.