72 lines
3.0 KiB
Go
72 lines
3.0 KiB
Go
package res
|
|
|
|
import (
|
|
"time"
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type DeviceInspectionResponse struct {
|
|
ID uuid.UUID `json:"id"`
|
|
DeviceCode string `json:"device_code"`
|
|
DeviceType string `json:"device_type"`
|
|
UserName string `json:"user_name"`
|
|
BackboneCode *string `json:"backbone_code,omitempty"`
|
|
FishboneCode *string `json:"fishbone_code,omitempty"`
|
|
TowerCode *string `json:"tower_code,omitempty"`
|
|
Status string `json:"status"`
|
|
PortUsed string `json:"port_used"`
|
|
PortAvailable string `json:"port_available"`
|
|
CableAmount int `json:"cable_amount"`
|
|
Description string `json:"description"`
|
|
ImageURL *string `json:"image_url,omitempty"`
|
|
InspectionPlacement string `json:"inspection_placement"` // Full address
|
|
Longitude float64 `json:"longitude"`
|
|
Latitude float64 `json:"latitude"`
|
|
InspectionApproval string `json:"inspection_approval"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type DeviceInspectionDetailResponse struct {
|
|
ID uuid.UUID `json:"id"`
|
|
Device DeviceInfo `json:"device"`
|
|
User UserInfo `json:"user"`
|
|
Backbone *BackboneInfo `json:"backbone,omitempty"`
|
|
Fishbone *FishboneInfo `json:"fishbone,omitempty"`
|
|
Tower *TowerInfo `json:"tower,omitempty"`
|
|
Status string `json:"status"`
|
|
PortUsed string `json:"port_used"`
|
|
PortAvailable string `json:"port_available"`
|
|
CableAmount int `json:"cable_amount"`
|
|
Description string `json:"description"`
|
|
ImageURL *string `json:"image_url,omitempty"`
|
|
InspectionPlacement string `json:"inspection_placement"` // Full address
|
|
Longitude float64 `json:"longitude"`
|
|
Latitude float64 `json:"latitude"`
|
|
InspectionApproval string `json:"inspection_approval"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
|
|
type DeviceInfo struct {
|
|
ID uuid.UUID `json:"id"`
|
|
DeviceCode string `json:"device_code"`
|
|
DeviceType string `json:"device_type"`
|
|
}
|
|
|
|
type UserInfo struct {
|
|
ID uuid.UUID `json:"id"`
|
|
Name string `json:"name"`
|
|
Username string `json:"username"`
|
|
}
|
|
|
|
type TowerInfo struct {
|
|
ID uuid.UUID `json:"id"`
|
|
TowerCode string `json:"tower_code"`
|
|
}
|
|
|
|
type FishboneInfo struct {
|
|
ID uuid.UUID `json:"id"`
|
|
FishboneCode string `json:"fishbone_code"`
|
|
} |