package entity import ( "time" "github.com/google/uuid" ) type Fishbone struct { ID uuid.UUID `json:"id"` BackboneID uuid.UUID `json:"backbone_id" gorm:"column:bb_id"` DeviceStartID uuid.UUID `json:"dev_start_id" gorm:"column:dev_start_id"` DeviceEndID uuid.UUID `json:"dev_end_id" gorm:"column:dev_end_id"` CoreAmount int `json:"core_amount"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeviceStart Device `gorm:"foreignKey:DeviceStartID"` DeviceEnd Device `gorm:"foreignKey:DeviceEndID"` Backbone Backbone `gorm:"foreignKey:BackboneID"` } func (Fishbone) TableName() string { return "fishbone" }