82 lines
2.6 KiB
Go
82 lines
2.6 KiB
Go
package dto
|
|
|
|
import "browser.local/platform/domain"
|
|
|
|
type SCUMPlayerLiveStateListResponse struct {
|
|
Items []domain.SCUMPlayerLiveState `json:"items"`
|
|
Count int `json:"count"`
|
|
}
|
|
|
|
type SCUMSquadListResponse struct {
|
|
Items []domain.SCUMSquad `json:"items"`
|
|
Count int `json:"count"`
|
|
}
|
|
|
|
type SCUMSquadMemberListResponse struct {
|
|
Items []domain.SCUMSquadMember `json:"items"`
|
|
Count int `json:"count"`
|
|
}
|
|
|
|
type SCUMVehicleListResponse struct {
|
|
Items []domain.SCUMVehicle `json:"items"`
|
|
Count int `json:"count"`
|
|
}
|
|
|
|
type SCUMFlagListResponse struct {
|
|
Items []domain.SCUMFlag `json:"items"`
|
|
Count int `json:"count"`
|
|
}
|
|
|
|
type SCUMCurrentPositionListResponse struct {
|
|
Items []domain.SCUMCurrentPosition `json:"items"`
|
|
Count int `json:"count"`
|
|
}
|
|
|
|
func SCUMPlayerLiveStatesFromDomain(values []domain.SCUMPlayerLiveState) SCUMPlayerLiveStateListResponse {
|
|
out := make([]domain.SCUMPlayerLiveState, len(values))
|
|
for index, value := range values {
|
|
out[index] = domain.CopySCUMPlayerLiveState(value)
|
|
}
|
|
return SCUMPlayerLiveStateListResponse{Items: out, Count: len(out)}
|
|
}
|
|
|
|
func SCUMSquadsFromDomain(values []domain.SCUMSquad) SCUMSquadListResponse {
|
|
out := make([]domain.SCUMSquad, len(values))
|
|
for index, value := range values {
|
|
out[index] = domain.CopySCUMSquad(value)
|
|
}
|
|
return SCUMSquadListResponse{Items: out, Count: len(out)}
|
|
}
|
|
|
|
func SCUMSquadMembersFromDomain(values []domain.SCUMSquadMember) SCUMSquadMemberListResponse {
|
|
out := make([]domain.SCUMSquadMember, len(values))
|
|
for index, value := range values {
|
|
out[index] = domain.CopySCUMSquadMember(value)
|
|
}
|
|
return SCUMSquadMemberListResponse{Items: out, Count: len(out)}
|
|
}
|
|
|
|
func SCUMVehiclesFromDomain(values []domain.SCUMVehicle) SCUMVehicleListResponse {
|
|
out := make([]domain.SCUMVehicle, len(values))
|
|
for index, value := range values {
|
|
out[index] = domain.CopySCUMVehicle(value)
|
|
}
|
|
return SCUMVehicleListResponse{Items: out, Count: len(out)}
|
|
}
|
|
|
|
func SCUMFlagsFromDomain(values []domain.SCUMFlag) SCUMFlagListResponse {
|
|
out := make([]domain.SCUMFlag, len(values))
|
|
for index, value := range values {
|
|
out[index] = domain.CopySCUMFlag(value)
|
|
}
|
|
return SCUMFlagListResponse{Items: out, Count: len(out)}
|
|
}
|
|
|
|
func SCUMCurrentPositionsFromDomain(values []domain.SCUMCurrentPosition) SCUMCurrentPositionListResponse {
|
|
out := make([]domain.SCUMCurrentPosition, len(values))
|
|
for index, value := range values {
|
|
out[index] = domain.CopySCUMCurrentPosition(value)
|
|
}
|
|
return SCUMCurrentPositionListResponse{Items: out, Count: len(out)}
|
|
}
|