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

export class LeagueConfigFormModelStewardingDTO {
  @ApiProperty({ enum: ['single_steward', 'committee_vote'] })
  @IsEnum(['single_steward', 'committee_vote'])
  decisionMode!: 'single_steward' | 'committee_vote';

  @ApiProperty({ required: false })
  @IsOptional()
  @IsNumber()
  requiredVotes?: number;

  @ApiProperty()
  @IsBoolean()
  requireDefense!: boolean;

  @ApiProperty()
  @IsNumber()
  defenseTimeLimit!: number; 

  @ApiProperty()
  @IsNumber()
  voteTimeLimit!: number; 

  @ApiProperty()
  @IsNumber()
  protestDeadlineHours!: number;

  @ApiProperty()
  @IsNumber()
  stewardingClosesHours!: number;

  @ApiProperty()
  @IsBoolean()
  notifyAccusedOnProtest!: boolean;

  @ApiProperty()
  @IsBoolean()
  notifyOnVoteRequired!: boolean;
}