40 lines
1.7 KiB
Go
40 lines
1.7 KiB
Go
package res
|
|
|
|
import (
|
|
"time"
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type DeviceDetailsResponse struct {
|
|
ID uuid.UUID `json:"id"`
|
|
DeviceCode string `json:"device_code"`
|
|
DeviceType string `json:"device_type"`
|
|
Address string `json:"address"`
|
|
Longitude float64 `json:"longitude"`
|
|
Latitude float64 `json:"latitude"`
|
|
Status string `json:"status"`
|
|
PortAmount int `json:"port_amount"`
|
|
PortUsed int `json:"port_used"`
|
|
PortAvailable int `json:"port_available"`
|
|
Region *string `json:"region,omitempty"`
|
|
Province *string `json:"province,omitempty"`
|
|
City *string `json:"city,omitempty"`
|
|
District *string `json:"district,omitempty"`
|
|
ImageURL *string `json:"image_url,omitempty"`
|
|
|
|
// Connection details
|
|
Backbones []BackboneConnectionInfo `json:"backbones"`
|
|
Fishbones []FishboneConnectionInfo `json:"fishbones"`
|
|
Towers []TowerConnectionDetail `json:"towers"`
|
|
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type TowerConnectionDetail struct {
|
|
ID uuid.UUID `json:"id"`
|
|
TowerCode string `json:"tower_code"`
|
|
Distance float64 `json:"distance_km"` // Distance from tower to device
|
|
ExternalTower *bool `json:"external_tower"` // Indicates if this is an external tower
|
|
ImageURL *string `json:"image_url,omitempty"`
|
|
} |