package
Version:
v0.0.0-...-52c4e47
Opens a new window with list of versions in this module.
Published: May 17, 2022
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
DBMigrate will create and migrate the tables, and then make the some relationships if necessary
type FuelPart struct {
gorm.Model
Title string `json:"title"`
Priority string `gorm:"type:ENUM('0', '1', '2', '3');default:'0'" json:"priority"`
Deadline *time.Time `gorm:"default:null" json:"deadline"`
Done bool `json:"done"`
TankID uint `json:"tank_id"`
}
type Tank struct {
gorm.Model
Title string `gorm:"unique" json:"title"`
Archived bool `json:"archived"`
Fuel []FuelPart `gorm:"ForeignKey:TankID" json:"fuel"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.