Subset.ts 1.3 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';
Viacheslav Pavlov's avatar
Viacheslav Pavlov committed
10

Matija Obreza's avatar
Subsets  
Matija Obreza committed
11
12
class Subset {
  public accessionCount: number;
13
  public accessionRefs: AccessionRef[];
Matija Obreza's avatar
Subsets  
Matija Obreza committed
14
  public active: boolean;
15
  public creators: SubsetCreator[];
Matija Obreza's avatar
Subsets  
Matija Obreza committed
16
17
18
19
20
21
22
  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
23
  public state: PublishState;
Matija Obreza's avatar
Subsets  
Matija Obreza committed
24
25
26
27
28
29
  public publisher: string;
  public rights: 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
37
38
39
40
41
42
43
44
45
46

  public static DEFAULT_SORT = {
    property: 'title',
    direction: 'ASC',
  };
  public static SORT_OPTIONS = {
    title: { label: 'Title', dir: 'ASC' },
    accessionCount: { label: 'Number of accessions', dir: 'ASC' },
    publisher: { label: 'Publisher', dir: 'ASC' },
    lastModifiedDate: { label: 'Last updated', dir: 'DESC' },
  };
}

Viacheslav Pavlov's avatar
Viacheslav Pavlov committed
47

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