Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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
VehicleModelID uint
VehicleModel VehicleModel
PersonID *int
Person *Person
}
An individual of a model, like Joe's Chevrolet Silverado
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.