Files
edr-platform/apps/edr-freight-api/src/modules/backoffice/dto/create-organization-user.dto.ts
Michael Abebe 2a489ca18d WIP
2026-06-02 12:12:28 +03:00

40 lines
813 B
TypeScript

import { ApiProperty } from "@nestjs/swagger";
import { IsBoolean, IsEmail, IsObject, IsOptional, IsString, MinLength } from "class-validator";
class CreateOrganizationUserNameDto {
@ApiProperty()
@IsString()
@MinLength(1)
en!: string;
@ApiProperty({ required: false })
@IsOptional()
@IsString()
am?: string;
}
export class CreateOrganizationUserDto {
@ApiProperty()
@IsEmail()
email!: string;
@ApiProperty()
@IsString()
@MinLength(1)
username!: string;
@ApiProperty({ required: false })
@IsOptional()
@IsString()
phoneNumber?: string;
@ApiProperty({ type: CreateOrganizationUserNameDto })
@IsObject()
name!: CreateOrganizationUserNameDto;
@ApiProperty({ required: false, default: false })
@IsOptional()
@IsBoolean()
assignOrganizationAdmin?: boolean;
}