seperate module for reseller

This commit is contained in:
2026-04-12 15:30:08 +03:30
parent 84ed654739
commit fccea733e3
12 changed files with 119 additions and 54 deletions
+19
View File
@@ -0,0 +1,19 @@
import { ApiProperty } from "@nestjs/swagger";
import { IsMobilePhone, IsNotEmpty, IsString, Length } from "class-validator";
import { AuthMessage } from "../../../common/enums/message.enum";
export class CreateResellerDto {
@IsNotEmpty()
@IsString()
@Length(2, 50,)
@ApiProperty({ description: "name", example: "mahyar" })
name: string;
@IsNotEmpty({ message: AuthMessage.PHONE_NOT_EMPTY })
@IsMobilePhone("fa-IR", {}, { message: AuthMessage.INVALID_PHONE_FORMAT })
@Length(11, 11, { message: AuthMessage.PHONE_SHOULD_BE_11_DIGIT })
@ApiProperty({ description: "phone number", default: "09922320740" })
phone: string;
}