create dictionary resource from metadata tab
[ccsdk/cds.git] / cds-ui / designer-client / src / app / modules / feature-modules / resource-dictionary / model / metaData.model.ts
index 609b066..89a83a1 100644 (file)
@@ -1,3 +1,5 @@
+import { JsonObject, JsonProperty } from 'json2typescript';
+
 /*
 * ============LICENSE_START=======================================================
 * ONAP : CDS
 * limitations under the License.
 * ============LICENSE_END=========================================================
 */
-
+@JsonObject()
 export class MetaData {
+    @JsonProperty('name')
     public name: string;
     public tags: string;
-    public dataType: string;
-    public description: string;
-    public entrySchema: string;
+    @JsonProperty('updated-by')
     public updatedBy: string;
-    public createdDate: string;
-    public libraryInstance: string;
-    public required: string;
-    public derivedFrom: string;
+    public property: Property;
+    public sources: any;
+
+    constructor() {
+        this.name = '';
+        this.tags = '';
+        this.updatedBy = '';
+        this.property = new Property();
+        this.sources = {};
+    }
+}
+
+@JsonObject()
+export class Property {
+    public description: string;
+    type: string;
+    required: boolean;
+    @JsonProperty('entry_schema')
+    // tslint:disable-next-line: variable-name
+    entry_schema: EntrySchema = new EntrySchema();
+
+    constructor() {
+        this.description = '';
+        this.type = '';
+        this.entry_schema = new EntrySchema();
+        this.required = false;
+    }
+
+}
+@JsonObject()
+export class EntrySchema {
+    type: string;
+    constraints: [];
+    constructor() {
+        this.type = '';
+        this.constraints = [];
+    }
 }