32 lines
1.0 KiB
TypeScript
32 lines
1.0 KiB
TypeScript
import { IsString, IsNotEmpty, MaxLength, IsNumber, IsBoolean, IsOptional } from 'class-validator'
|
|
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'
|
|
|
|
export class GrantAuthCityCompanyDto {
|
|
@ApiProperty({ description: '用户ID' })
|
|
@IsString()
|
|
@IsNotEmpty({ message: '用户ID不能为空' })
|
|
userId: string
|
|
|
|
@ApiProperty({ description: '账户序列号' })
|
|
@IsNumber()
|
|
@IsNotEmpty({ message: '账户序列号不能为空' })
|
|
accountSequence: number
|
|
|
|
@ApiProperty({ description: '城市代码', example: '430100' })
|
|
@IsString()
|
|
@IsNotEmpty({ message: '城市代码不能为空' })
|
|
@MaxLength(20, { message: '城市代码最大20字符' })
|
|
cityCode: string
|
|
|
|
@ApiProperty({ description: '城市名称', example: '长沙市' })
|
|
@IsString()
|
|
@IsNotEmpty({ message: '城市名称不能为空' })
|
|
@MaxLength(50, { message: '城市名称最大50字符' })
|
|
cityName: string
|
|
|
|
@ApiPropertyOptional({ description: '是否跳过考核直接激活权益', default: false })
|
|
@IsBoolean()
|
|
@IsOptional()
|
|
skipAssessment?: boolean
|
|
}
|