package entity import ( "time" "github.com/google/uuid" ) type Backbone struct { ID uuid.UUID `json:"id" gorm:"type:uuid;primaryKey"` BackboneCode string `json:"backbone_code" gorm:"unique"` DeviceStartID uuid.UUID `json:"dev_start_id" gorm:"type:uuid;column:dev_start_id"` DeviceEndID uuid.UUID `json:"dev_end_id" gorm:"type:uuid;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"` } func (Backbone) TableName() string { return "backbone" }