import { OrgRole } from '@prisma/client';
import { IsEmail, IsEnum, IsNotEmpty, IsString, MaxLength } from 'class-validator';

export class UpdateOrgDto {
  @IsString()
  @IsNotEmpty()
  @MaxLength(120)
  name: string;
}

export class AddMemberDto {
  @IsEmail()
  email: string;

  @IsEnum(OrgRole)
  role: OrgRole;
}

export class UpdateMemberDto {
  @IsEnum(OrgRole)
  role: OrgRole;
}
