batman
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
import { IsString, IsOptional, IsArray, IsInt, Min, IsUUID } from 'class-validator';
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
|
||||
class OpenTabDto {
|
||||
@ApiProperty({ example: 'local-tab-uuid' })
|
||||
@IsString()
|
||||
id: string;
|
||||
|
||||
@ApiProperty({ example: 'Jan' })
|
||||
@IsString()
|
||||
customerName: string;
|
||||
|
||||
@ApiProperty({ example: 5 })
|
||||
@IsInt()
|
||||
@Min(0)
|
||||
version: number;
|
||||
|
||||
@ApiProperty({ example: 2450 })
|
||||
@IsInt()
|
||||
@Min(0)
|
||||
totalInCents: number;
|
||||
|
||||
@ApiProperty({ example: 3 })
|
||||
@IsInt()
|
||||
@Min(0)
|
||||
itemCount: number;
|
||||
}
|
||||
|
||||
export class SyncDto {
|
||||
@ApiProperty({ example: 'uuid' })
|
||||
@IsUUID()
|
||||
deviceId: string;
|
||||
|
||||
@ApiPropertyOptional({ example: 'cursor-value' })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
cursor?: string;
|
||||
|
||||
@ApiProperty({ type: [OpenTabDto] })
|
||||
@IsArray()
|
||||
openTabs: OpenTabDto[];
|
||||
}
|
||||
Reference in New Issue
Block a user