18 lines
407 B
TypeScript
18 lines
407 B
TypeScript
import { Field, InputType } from '@nestjs/graphql';
|
|
import { IsNotEmpty, IsString, IsMobilePhone } from 'class-validator';
|
|
|
|
@InputType()
|
|
export class RequestOtpInput {
|
|
@Field(() => String, { description: 'Mobile number' })
|
|
@IsNotEmpty()
|
|
@IsString()
|
|
@IsMobilePhone('fa-IR')
|
|
phone: string;
|
|
|
|
@Field(() => String, { description: 'Restaurant slug' })
|
|
@IsNotEmpty()
|
|
@IsString()
|
|
slug: string;
|
|
}
|
|
|