Documentation ¶
Index ¶
- func MapApiVehicleForSaleAmount_Custom(amount decimal.Decimal) string
- func MapApiVehicleForSaleDuration(duration time.Duration) int
- func MapVehicleForSaleAmount_Custom(apiAmount string) decimal.Decimal
- func MapVehicleForSaleDuration(apiDuration int) time.Duration
- type Manufacturer
- type Part
- type Person
- type Vehicle
- type VehicleForSale
- type VehicleModel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapApiVehicleForSaleAmount_Custom ¶
Custom API map function for VehicleForSale.Amount from model to API
func MapApiVehicleForSaleDuration ¶
Custom API map function for VehicleForSale.Duration from model to API
func MapVehicleForSaleAmount_Custom ¶
Custom map function for VehicleForSale.Amount from API to model
func MapVehicleForSaleDuration ¶
Custom map function for VehicleForSale.Duration from API to model
Types ¶
type Manufacturer ¶
type Manufacturer struct { gorm.Model Name string Vehicles []VehicleModel }
A vehicle manufacturer, like Chevrolet
type Part ¶
type Part struct { gorm.Model Name string Cost int Models []VehicleModel `gorm:"many2many:model_parts;"` }
A vehicle part for one or more models, like a muffler for all Chevrolet pickups
type Vehicle ¶
type Vehicle struct { gorm.Model Vin string `gorm:"uniqueIndex"` VehicleModelID uint VehicleModel VehicleModel PersonID uint Person Person }
An individual of a model, like Joe's Chevrolet Silverado
type VehicleForSale ¶
type VehicleForSale struct { gorm.Model VehicleID uint Vehicle Vehicle Amount decimal.Decimal `` /* 134-byte string literal not displayed */ Duration time.Duration `goalesce:"openapi_type:integer;"` }
A vehicle for sale
type VehicleModel ¶
type VehicleModel struct { gorm.Model Name string ManufacturerID uint Manufacturer Manufacturer Parts []Part `gorm:"many2many:vehicle_parts;"` }
A vehicle model, like a Chevrolet Silverado
Click to show internal directories.
Click to hide internal directories.