summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/models/collectionResourceModel.ts
blob: 259e1863358fc8971bc7613101c4a6848ac0fb40 (plain)
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
import {Level1Model, Level1ModelProperties, Level1ModelResponseInterface} from "./nodeModel";
import {NcfModelInterface} from "./ncfModel";

export interface CollectionResourceProperties extends Level1ModelProperties{
}

export interface CollectionResourceModelResponseInterface extends Level1ModelResponseInterface{
  properties: CollectionResourceProperties;
  networksCollection: { [key: string]: NcfModelInterface };
}

export class CollectionResourceModel extends Level1Model{

  roles: string[] = [];
  properties: CollectionResourceProperties;
  networksCollection: { [key: string]: NcfModelInterface };

  constructor(collectionResourceJson?: CollectionResourceModelResponseInterface){
    super(collectionResourceJson);
    if(collectionResourceJson && collectionResourceJson.properties){
      this.properties = collectionResourceJson.properties;
    }
    if (collectionResourceJson && collectionResourceJson.networksCollection) {
      this.networksCollection = collectionResourceJson.networksCollection;
    }
  }

}