Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
ID uuid.UUID `gorm:"index:;primaryKey;type:char(36)"`
Name string `gorm:"not null; unique"`
Description string
Manufacturer *Manufacturer
Location *Location
Type *Type
ManufacturerId string `gorm:"not null;type:char(36)"`
LocationId string `gorm:"not null;type:char(36)"`
TypeId string `gorm:"not null;type:char(36)"`
Quantity int `gorm:"not null; check:quantity > 0"`
Contents string `gorm:"type:text"`
gorm.Model
}
func DeviceFromJson ¶
func DeviceFromJson(device JsonDevice, db *gorm.DB) (*Device, error)
type JsonDevice ¶
type JsonLocation ¶
type JsonLocation BaseJson
type JsonManufacturer ¶
type JsonManufacturer BaseJson
type Location ¶
type Manufacturer ¶
Click to show internal directories.
Click to hide internal directories.