MaterialRequest.ts 1.17 KB
Newer Older
1
import MaterialSubRequest from 'model/request/MaterialSubRequest';
Matija Obreza's avatar
Matija Obreza committed
2
3
4
5
6
7

/*
* Defined in Swagger as '#/definitions/MaterialRequest'
*/
class MaterialRequest {
  public active: boolean;
Viacheslav Pavlov's avatar
Viacheslav Pavlov committed
8
  public body: any;
Matija Obreza's avatar
Matija Obreza committed
9
10
11
12
13
14
15
16
17
  public createdBy: number;
  public createdDate: Date;
  public email: string;
  public id: number;
  public lastModifiedBy: number;
  public lastModifiedDate: Date;
  public lastReminderDate: Date;
  public pid: string;
  public state: number;
Matija Obreza's avatar
Matija Obreza committed
18
  public subrequests: MaterialSubRequest[];
Matija Obreza's avatar
Matija Obreza committed
19
20
21
  public uuid: string;
  public version: number;

Matija Obreza's avatar
Matija Obreza committed
22
23
24
25
  public static DEFAULT_SORT = {
    property: 'lastModifiedDate',
    direction: 'DESC',
  };
Matija Obreza's avatar
Matija Obreza committed
26

27
28
29
30
31
32
33
34
35
36
37
  public static STATE: { [key: number]: string; } = {
    0: 'requests.common.state.0',
    1: 'requests.common.state.1',
    2: 'requests.common.state.2',
  };

  public static SORT_OPTIONS = {
    lastModifiedDate: { property: 'lastModifiedDate', label: 'requests.sort.lastModifiedDateAsc', direction: 'ASC' },
    lastModifiedDateD: { property: 'lastModifiedDate', label: 'requests.sort.lastModifiedDateDesc', direction: 'DESC' },
    email: { property: 'email', label: 'requests.common.emailAddress', direction: 'ASC' },
  };
Matija Obreza's avatar
Matija Obreza committed
38
39
40
}

export default MaterialRequest;