diff options
author | KAPIL SINGAL <ks220y@att.com> | 2021-01-14 04:21:41 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-01-14 04:21:41 +0000 |
commit | 424fcd63ca57bd8cfa8b46001021c29e020a8a6d (patch) | |
tree | a01ea339509880ea337ef4290eba008af964766b /cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/model/metaData.model.ts | |
parent | cae13f9196921c1b854d2f199db4dfbdd5868a62 (diff) | |
parent | 50b86c6a59e2a65c4a2ff5c97997bba21da6a98b (diff) |
Merge "enable 2-way binding between metadata and editor tabs"
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/model/metaData.model.ts')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/model/metaData.model.ts | 49 |
1 files changed, 40 insertions, 9 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/model/metaData.model.ts b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/model/metaData.model.ts index 26420882c..92e6bce43 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/model/metaData.model.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/model/metaData.model.ts @@ -1,3 +1,5 @@ +import { JsonObject, JsonProperty } from 'json2typescript'; + /* * ============LICENSE_START======================================================= * ONAP : CDS @@ -17,17 +19,46 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - +@JsonObject() export class MetaData { + @JsonProperty('name') public name: string; - public dataType: string; - public description: string; - public entrySchema: string; - public updatedBy: string; public tags: string; - public required: string; + @JsonProperty('updated-by') + public updatedBy: string; + public property: Property; - public createdDate: string; - public libraryInstance: string; - public derivedFrom: string; + constructor() { + this.name = ''; + this.tags = ''; + this.updatedBy = ''; + this.property = new Property(); + } +} + +@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 = []; + } } |