Subset.ts 1.35 KB
Newer Older
Matija Obreza's avatar
Subsets  
Matija Obreza committed
1
2
3
4

/*
* Defined in OpenAPI as '#/definitions/Subset'
*/
Viacheslav Pavlov's avatar
Viacheslav Pavlov committed
5
import {PublishState} from 'model/common.model';
6
7
8
import SubsetCreator from 'model/subset/SubsetCreator';
import FaoInstitute from 'model/genesys/FaoInstitute';
import Crop from 'model/genesys/Crop';
9
import {AccessionRef} from 'model/accession/AccessionRef';
Matija Obreza's avatar
Matija Obreza committed
10
import { SortDirection } from 'model/Page';
Viacheslav Pavlov's avatar
Viacheslav Pavlov committed
11

Matija Obreza's avatar
Subsets  
Matija Obreza committed
12
13
class Subset {
  public accessionCount: number;
14
  public accessionRefs: AccessionRef[];
Matija Obreza's avatar
Subsets  
Matija Obreza committed
15
  public active: boolean;
16
  public creators: SubsetCreator[];
Matija Obreza's avatar
Subsets  
Matija Obreza committed
17
18
19
20
21
22
23
  public createdBy: number;
  public createdDate: Date;
  public dateCreated: string;
  public description: string;
  public id: number;
  public lastModifiedBy: number;
  public lastModifiedDate: Date;
Viacheslav Pavlov's avatar
Viacheslav Pavlov committed
24
  public state: PublishState;
Matija Obreza's avatar
Subsets  
Matija Obreza committed
25
26
27
28
29
  public publisher: string;
  public title: string;
  public uuid: string;
  public version: number;
  public wiewsCode: string;
30
31
32
  public crops: Crop[];
  public date: string;
  public source: string;
33
  public institute: FaoInstitute;
Matija Obreza's avatar
Subsets  
Matija Obreza committed
34
35
36

  public static DEFAULT_SORT = {
    property: 'title',
Matija Obreza's avatar
Matija Obreza committed
37
    direction: SortDirection.ASC,
Matija Obreza's avatar
Subsets  
Matija Obreza committed
38
39
  };
  public static SORT_OPTIONS = {
Matija Obreza's avatar
Matija Obreza committed
40
41
42
43
    title: { label: 'Title', direction: 'ASC' },
    accessionCount: { label: 'Number of accessions', direction: 'ASC' },
    publisher: { label: 'Publisher', direction: 'ASC' },
    lastModifiedDate: { label: 'Last updated', direction: 'DESC' },
Matija Obreza's avatar
Subsets  
Matija Obreza committed
44
45
46
  };
}

Viacheslav Pavlov's avatar
Viacheslav Pavlov committed
47

Matija Obreza's avatar
Subsets  
Matija Obreza committed
48
export default Subset;