24 lines
610 B
Go
24 lines
610 B
Go
package entity
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type Backbone struct {
|
|
ID uuid.UUID `json:"id"`
|
|
BackboneCode string `json:"backbone_code"`
|
|
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"`
|
|
}
|
|
|
|
func (Backbone) TableName() string {
|
|
return "backbone"
|
|
} |