-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCase.js
More file actions
53 lines (47 loc) · 1.04 KB
/
Copy pathCase.js
File metadata and controls
53 lines (47 loc) · 1.04 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
/** @typedef {'open' | 'dismissed' | 'proceeded'} CaseStatus */
/** @typedef {'bullying' | 'cheating' | 'disruptive_behavior' | 'fraud' | 'gambling' | 'harassment' | 'improper_uniform' | 'littering' | 'plagiarism' | 'prohibited_items' | 'vandalism' | 'other'} CaseViolation */
/**
* @typedef {{
* author: string,
* raw: true
* }} CaseRaw
*/
/**
* @typedef {{
* attachments: import('./Repository').RepositoryProps[],
* author: import('./Student').StudentProps,
* raw: false
* }} CaseProcessed
*/
/**
* @typedef {{
* id: number | string,
* violation: CaseViolation,
* status: CaseStatus,
* content: string
* }} BaseCaseProps
*/
/**
* @typedef {BaseCaseProps & (CaseRaw | CaseProcessed)} CaseProps
*/
class Case {
/**
* @param {CaseProps} props
*/
constructor({
id,
violation,
description,
attachments,
author,
raw = false
}) {
this.id = id;
this.violation = violation;
this.description = description;
this.attachments = attachments;
this.author = author;
this.raw = raw;
};
};
export default Case;