-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.ts
More file actions
96 lines (84 loc) · 1.74 KB
/
models.ts
File metadata and controls
96 lines (84 loc) · 1.74 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import { BugStatuses, ReportStatuses } from "@/const";
export type User = {
id: string | null;
name: string | null;
};
export type AttachmentRequest = {
file: File;
};
export type AttachmentResponse = {
id: number;
bugId: number;
reportId: number;
path: string | null;
createdAt: string;
attachType: number;
};
export type BugResponse = {
id: number;
reportId: number;
receive: string | null;
expect: string | null;
creator: User;
createdAt: string;
updatedAt: string;
status: BugStatuses;
attachments: AttachmentResponse[];
comments: CommentResponse[];
};
export type BugCreateRequest = {
receive: string | null;
expect: string | null;
};
export type BugUpdateRequest = {
receive: string | null;
expect: string | null;
status: BugStatuses | null;
};
export type CommentResponse = {
id: number;
bugId: number;
text: string | null;
creator: User;
createdAt: string;
updatedAt: string;
};
export type ReportResponse = {
id: number;
title: string | null;
status: ReportStatuses;
responsible: User;
creator: User;
createdAt: string;
updatedAt: string;
participants: User[] | null;
bugs: BugResponse[] | null;
};
export type CreateReportRequest = {
title: string | null;
responsibleId: string | null;
bugs:
| {
receive: string | null;
expect: string | null;
}[]
| null;
};
export type UpdateReportRequest = {
title: string | null;
status: ReportStatuses | null;
responsibleUserId: string | null;
};
export type SearchResponse = {
reports: ReportResponse[];
total: number;
};
export type SearchRequestQueryParams = {
query?: string;
reportStatuses?: number[];
userId?: string;
teamId?: string;
sort?: string;
skip?: number;
take?: number;
};