| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- import {
- Length,
- IsString,
- IsEmail,
- ValidateIf,
- Allow,
- } from 'class-validator';
- import { Expose } from 'class-transformer';
- export class LoginInfoDto {
- @IsString()
- @Expose()
- username: string;
- @IsString()
- @Expose()
- password: string;
- @IsString()
- @Expose()
- captchaId: string;
- @Length(4)
- @Expose()
- verifyCode: string;
- }
- export class UpdatePersonInfoDto {
- @Length(2, 20)
- @Expose()
- name: string;
- @Allow()
- @Expose()
- nickName: string;
- @ValidateIf((_o, v) => { return !(v === '' || v === undefined || v === null); })
- @IsEmail()
- @Expose()
- email: string;
- @Allow()
- @Expose()
- phone: string;
- @Allow()
- @Expose()
- originPassword: string;
- @Allow()
- @Expose()
- newPassword: string;
- @Allow()
- @Expose()
- remark: string;
- @Allow()
- @Expose()
- headImg: string;
- }
|