import { IsEmail, IsString, MaxLength, MinLength } from 'class-validator'

// Operator-only: invite someone at a partner organization. Mirrors
// InviteOperatorDto in shape — body is just identity. The partner is
// resolved from the URL slug (POST /partners/:slug/users) so it never
// appears in the body. The created user is added to the
// dezky-partner-staff Authentik group and has User.partnerId set to the
// partner's _id; future partner-portal scope guards use that to allow
// access only to the partner's own data.
export class InvitePartnerUserDto {
  @IsString() @MinLength(2) @MaxLength(120)
  name!: string

  @IsEmail() @MaxLength(254)
  email!: string
}
