import { IsString, IsNotEmpty, MaxLength, IsNumber, IsBoolean, IsOptional } from 'class-validator'
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'

export class GrantProvinceCompanyDto {
  @ApiProperty({ description: '用户ID' })
  @IsString()
  @IsNotEmpty({ message: '用户ID不能为空' })
  userId: string

  @ApiProperty({ description: '账户序列号' })
  @IsString()
  @IsNotEmpty({ message: '账户序列号不能为空' })
  accountSequence: string

  @ApiProperty({ description: '省份代码', example: '430000' })
  @IsString()
  @IsNotEmpty({ message: '省份代码不能为空' })
  @MaxLength(20, { message: '省份代码最大20字符' })
  provinceCode: string

  @ApiProperty({ description: '省份名称', example: '湖南省' })
  @IsString()
  @IsNotEmpty({ message: '省份名称不能为空' })
  @MaxLength(50, { message: '省份名称最大50字符' })
  provinceName: string

  @ApiPropertyOptional({ description: '是否跳过考核直接激活权益', default: false })
  @IsBoolean()
  @IsOptional()
  skipAssessment?: boolean
}
