|
|
|
## game.dto.ts
|
|
|
|
|
|
|
|
### newGameDTO
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
{
|
|
|
|
export class newGameDTO {
|
|
|
|
@IsString()
|
|
|
|
@IsNotEmpty()
|
|
|
|
@Length(3, 30)
|
|
|
|
name: string;
|
|
|
|
@IsString()
|
|
|
|
@IsNotEmpty()
|
|
|
|
@Length(1, 255)
|
|
|
|
desc: string;
|
|
|
|
@ValidateNested()
|
|
|
|
@Type(() => CenterDTO)
|
|
|
|
center: CenterDTO;
|
|
|
|
@IsDateString()
|
|
|
|
@IsNotEmpty()
|
|
|
|
startdate: string;
|
|
|
|
@IsDateString()
|
|
|
|
@IsNotEmpty()
|
|
|
|
enddate: string;
|
|
|
|
@Length(0, 65)
|
|
|
|
image: string;
|
|
|
|
@Allow()
|
|
|
|
map?: JSON;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
``` |