data-element.ts 694 Bytes
Newer Older
1
2
3
4
5
6
/**
 * Tasks:
 * 
 * *Move DataElement<T> to its ts file. It would be really nice to put this in the data structures project since it shadows a class there.
 * *Add a unit test?
 */
7
import {v4 as uuidv4} from 'uuid';
8

9
10
11
export class DataElement {
    privateId: string;
    id: number;
12
13
    name: string;
    description: string;
14
15
16
17
    comment: string;
    context: string;
    required: boolean;
    secret: boolean;
18
19

    constructor() {
20
21
        this.privateId = uuidv4();
        this.id = 0;
22
23
        this.name = 'name';
        this.description = 'description';
24
25
26
27
28
        this.comment = 'comment';
        this.context = 'context';
        this.required = false;
        this.secret = true;
    }
29
}