summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/models/data-types.ts
diff options
context:
space:
mode:
authorandre.schmid <andre.schmid@est.tech>2022-09-23 12:31:12 +0100
committerMichael Morris <michael.morris@est.tech>2022-10-05 08:18:25 +0000
commit6ed5592ccb3b2bdb61403f1d1d41d93088cb0709 (patch)
tree1978737dc736d000dbb34a9ddc50a7e2008ab573 /catalog-ui/src/app/models/data-types.ts
parent404bfc9c50e95df1e75dbf8325fae41bfd96871a (diff)
Add data type view/workspace
Implements a data type workspace, based on the Service/VF workspace, where it is possible to view a data type information. Issue-ID: SDC-4193 Signed-off-by: André Schmid <andre.schmid@est.tech> Change-Id: Ica341efa43e70b4ac85d42d22a1397e0ab6e2794
Diffstat (limited to 'catalog-ui/src/app/models/data-types.ts')
-rw-r--r--catalog-ui/src/app/models/data-types.ts53
1 files changed, 28 insertions, 25 deletions
diff --git a/catalog-ui/src/app/models/data-types.ts b/catalog-ui/src/app/models/data-types.ts
index 7fc788bf93..3b0833b5b4 100644
--- a/catalog-ui/src/app/models/data-types.ts
+++ b/catalog-ui/src/app/models/data-types.ts
@@ -29,36 +29,39 @@ import {PROPERTY_DATA} from "../utils/constants";
export class DataTypeModel {
- //server data
- name:string;
- uniqueId:string;
- derivedFromName:string;
- derivedFrom:DataTypeModel;
- creationTime:string;
- modificationTime:string;
+ name: string;
+ uniqueId: string;
+ derivedFromName: string;
+ derivedFrom: DataTypeModel;
+ description: string;
+ creationTime: string;
+ modificationTime: string;
properties: Array<PropertyBEModel>;
attributes: Array<AttributeBEModel>;
model: Model;
- constructor(dataType: DataTypeModel) {
- if (dataType) {
- this.uniqueId = dataType.uniqueId;
- this.name = dataType.name;
- this.derivedFromName = dataType.derivedFromName;
- if (dataType.derivedFrom) {
- this.derivedFrom = new DataTypeModel(dataType.derivedFrom);
- }
- this.creationTime = dataType.creationTime;
- this.modificationTime = dataType.modificationTime;
- if (dataType.properties) {
- this.properties = [];
- dataType.properties.forEach(property => {
- this.properties.push(new PropertyBEModel(property));
- });
- }
- this.attributes = dataType.attributes;
- this.model = dataType.model;
+ constructor(dataType?: DataTypeModel) {
+ if (!dataType) {
+ return;
}
+
+ this.uniqueId = dataType.uniqueId;
+ this.name = dataType.name;
+ this.description = dataType.description;
+ this.derivedFromName = dataType.derivedFromName;
+ if (dataType.derivedFrom) {
+ this.derivedFrom = new DataTypeModel(dataType.derivedFrom);
+ }
+ this.creationTime = dataType.creationTime;
+ this.modificationTime = dataType.modificationTime;
+ if (dataType.properties) {
+ this.properties = [];
+ dataType.properties.forEach(property => {
+ this.properties.push(new PropertyBEModel(property));
+ });
+ }
+ this.attributes = dataType.attributes;
+ this.model = dataType.model;
}
public toJSON = ():any => {