24 lines
455 B
TypeScript
24 lines
455 B
TypeScript
import { IsInt, IsOptional, IsString, Matches, Max, MaxLength, Min } from 'class-validator'
|
|
|
|
export class CreateLessonSupplementDto {
|
|
@IsString()
|
|
@Matches(/^[a-zA-Z0-9_-]{16,80}$/)
|
|
readonly requestId!: string
|
|
|
|
@IsInt()
|
|
@Min(1)
|
|
@Max(999)
|
|
readonly quantity!: number
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
@Matches(/\S/)
|
|
@MaxLength(191)
|
|
readonly membershipId?: string
|
|
|
|
@IsOptional()
|
|
@IsString()
|
|
@MaxLength(200)
|
|
readonly remark?: string
|
|
}
|