Skip to content
GitLab
Explore
Sign in
Changes
Page history
documentation update
authored
Jul 29, 2019
by
L4168
Show whitespace changes
Inline
Side-by-side
src/dtos.md
View page @
183cfaae
...
@@ -192,3 +192,60 @@ export class JoinGameGroupDTO {
...
@@ -192,3 +192,60 @@ export class JoinGameGroupDTO {
groupId
:
GameGroupEntity
;
groupId
:
GameGroupEntity
;
}
}
```
```
### MapDrawingDTO
```
typescript
export
class
MapDrawingDTO
{
@
IsOptional
()
@
IsUUID
(
"
4
"
)
mapDrawingId
:
string
;
@
IsOptional
()
@
IsUUID
(
"
4
"
)
faction
:
FactionEntity
;
@
IsNotEmpty
()
@
ValidateNested
()
@
Type
(()
=>
DataDTO
)
data
:
DataDTO
;
@
IsOptional
()
@
IsUUID
(
"
4
"
)
gameId
:
GameEntity
;
@
IsBoolean
()
drawingIsActive
?:
boolean
;
}
```
### DataDTO
```
typescript
export
class
DataDTO
{
@
IsArray
()
coordinates
:
number
[];
@
IsString
()
type
:
string
;
@
IsOptional
()
@
IsHexColor
()
colour
:
string
;
@
IsOptional
()
radius
:
number
;
@
IsOptional
()
text
:
string
;
}
```
### GeoDTO
```
typescript
export
class
GeoDTO
{
@
IsNumber
()
@
Min
(
-
90
)
@
Max
(
90
)
lat
:
number
;
@
IsNumber
()
@
Min
(
-
180
)
@
Max
(
180
)
lng
:
number
;
@
Allow
()
time
:
number
;
}
```