import { IsEmail, IsNotEmpty, Length, Matches } from 'class-validator';
import { MESSAGES, REGEX } from '../common.utils';

export class MechantRegistrationRequestDto {
  @IsNotEmpty({ message: 'Full Name is required!' })
  @Length(3.255)
  Full_Name: string;

  @IsNotEmpty({ message: 'Email is required!' })
  @IsEmail()
  @Length(3.255)
  Email: string;

  @IsNotEmpty({ message: 'Contact No is required!' })
  Contact_no: number;

  @IsNotEmpty({ message: 'Password is required!' })
  @Matches(REGEX.PASSWORD_RULE, {
    message:
      'Password should have 1 uppercase lowercase letter and number and special character',
  })
  Password: string;

  @IsNotEmpty({ message: 'Confirm Password is required!' })
  @Matches(REGEX.PASSWORD_RULE, {
    message: MESSAGES.PASSWORD_RULE_MESSAGE,
  })
  ConfirmPass: string;

  @IsNotEmpty({ message: 'Marchant_Location_idMarchant_Location is required!' })
  Marchant_Location_idMarchant_Location: number;
}
