wireplanner/internal/models/models.go

85 lines
1.6 KiB
Go

package models
import "time"
type DeviceModel struct {
ID int64
Name string
Manufacturer string
IsRackMountable bool
HeightUnits *int
FrontImage string
BackImage string
IsPatchPanel bool
IsWallSocket bool
CreatedAt time.Time
UpdatedAt time.Time
Ports []DeviceModelPort
}
type DeviceModelPort struct {
ID int64
DeviceModelID int64
Name string
Side string
Position int
}
type Rack struct {
ID int64
Name string
RackType string
Depth string
HeightUnits int
Comment string
CreatedAt time.Time
UpdatedAt time.Time
}
type Device struct {
ID int64
DeviceModelID int64
Name string
UsageDescription string
Comment string
Location string
RackID *int64
RackUnitStart *int
RackSide *string
CreatedAt time.Time
UpdatedAt time.Time
Model *DeviceModel
Ports []DevicePort
Rack *Rack
}
type DevicePort struct {
ID int64
DeviceID int64
Name string
Side string
Position int
}
type ConnectionType struct {
ID int64
Name string
}
type Connection struct {
ID int64
ConnectionTypeID int64
Label1 *string
Label2 *string
Color string
PortID1 *int64
PortID2 *int64
CreatedAt time.Time
UpdatedAt time.Time
ConnectionType *ConnectionType
Port1 *DevicePort
Port2 *DevicePort
Device1 *Device
Device2 *Device
}