20 lines
619 B
TypeScript
20 lines
619 B
TypeScript
import { ApiProperty } from "@nestjs/swagger";
|
|
import { IsDateString, IsNotEmpty, IsUUID } from "class-validator";
|
|
|
|
export class CreateTimeDto {
|
|
@ApiProperty({ description: "Start time of the entry", example: "2026-07-15T08:00:00.000Z" })
|
|
@IsDateString()
|
|
@IsNotEmpty()
|
|
startedAt: string;
|
|
|
|
@ApiProperty({ description: "End time of the entry", example: "2026-07-15T10:30:00.000Z" })
|
|
@IsDateString()
|
|
@IsNotEmpty()
|
|
endedAt: string;
|
|
|
|
@ApiProperty({ description: "ID of the task this time entry belongs to", example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" })
|
|
@IsUUID()
|
|
@IsNotEmpty()
|
|
taskId: string;
|
|
}
|