NAM-APJATEL-BACKEND/model/dto/res/olt.go

40 lines
1.3 KiB
Go

package res
import (
"time"
"github.com/google/uuid"
)
type OLTResponse struct {
ID uuid.UUID `json:"id"`
OLTName string `json:"name"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type OLTDetailResponse struct {
ID uuid.UUID `json:"id"`
OLTName string `json:"name"`
DeviceCount int `json:"device_count"`
Devices []DeviceDetailsResponse `json:"devices"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type OLTDeviceResponse struct {
ID uuid.UUID `json:"id"`
DeviceCode string `json:"device_code"`
DeviceType string `json:"device_type"`
Address string `json:"address"`
Province *string `json:"province,omitempty"`
City *string `json:"city,omitempty"`
District *string `json:"district,omitempty"`
Status string `json:"status"`
PortAmount int `json:"port_amount"`
PortUsed int `json:"port_used"`
ImageURL *string `json:"image_url,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}