-
-
Notifications
You must be signed in to change notification settings - Fork 92
Expand file tree
/
Copy pathtask.ts
More file actions
42 lines (32 loc) · 800 Bytes
/
task.ts
File metadata and controls
42 lines (32 loc) · 800 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import type { DueDate } from "@/api/domain/dueDate";
import type { ProjectId } from "@/api/domain/project";
import type { SectionId } from "@/api/domain/section";
export type TaskId = string;
export type Task = {
id: TaskId;
createdAt: string;
content: string;
description: string;
projectId: ProjectId;
sectionId: SectionId | null;
parentId: TaskId | null;
labels: string[];
priority: Priority;
due: DueDate | null;
duration: Duration | null;
order: number;
};
export type Priority = 1 | 2 | 3 | 4;
export type CreateTaskParams = {
priority: number;
projectId: ProjectId;
description?: string;
sectionId?: SectionId;
dueDate?: string;
dueDatetime?: string;
labels?: string[];
};
export type Duration = {
amount: number;
unit: "minute" | "day";
};