import { IsOptional, IsString, IsNotEmpty, IsNumber, IsBoolean, IsDateString } from 'class-validator'

export class CreateTimeEntryDto {
  @IsString() @IsNotEmpty()
  matterId: string

  @IsString() @IsNotEmpty()
  clientFolderId: string

  @IsString() @IsNotEmpty()
  attorney: string

  @IsDateString()
  date: string

  @IsNumber()
  durationMinutes: number

  @IsNumber()
  ratePerHour: number

  @IsString() @IsNotEmpty()
  currency: string

  @IsString() @IsNotEmpty()
  description: string

  @IsOptional() @IsString() taskCode?: string
  @IsOptional() @IsBoolean() billed?: boolean
  @IsOptional() @IsString() invoiceRef?: string
  @IsOptional() @IsString() createdBy?: string
}
