import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsOptional, IsPhoneNumber, IsString } from 'class-validator';

export class CreateAdminDto {
  @ApiProperty({ description: 'Mobile phone number' })
  @IsNotEmpty()
  @IsString()
  @IsPhoneNumber("IR")
  phone!: string;

  @ApiProperty({ description: 'First name', required: false })
  @IsOptional()
  @IsString()
  firstName?: string;

  @ApiProperty({ description: 'Last name', required: false })
  @IsOptional()
  @IsString()
  lastName?: string;

  @ApiProperty({ description: 'Role id for the admin' })
  @IsNotEmpty()
  @IsString()
  roleId!: string;
}
