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

export class LeagueMembershipDTO {
  @ApiProperty()
  @IsString()
  id!: string;

  @ApiProperty()
  @IsString()
  leagueId!: string;

  @ApiProperty()
  @IsString()
  driverId!: string;

  @ApiProperty({ enum: ['owner', 'admin', 'steward', 'member'] })
  @IsEnum(['owner', 'admin', 'steward', 'member'])
  role!: 'owner' | 'admin' | 'steward' | 'member';

  @ApiProperty({ enum: ['active', 'inactive', 'pending'] })
  @IsEnum(['active', 'inactive', 'pending'])
  status!: 'active' | 'inactive' | 'pending';

  @ApiProperty()
  @IsString()
  joinedAt!: string;
}