@reldens/storage 0.58.0 → 0.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -130,12 +130,14 @@ class EntitiesGeneration extends BaseGenerator
|
|
|
130
130
|
let column = columns[columnName];
|
|
131
131
|
let propertyKey = titleProperty && titleProperty === columnName ? '[titleProperty]' : columnName;
|
|
132
132
|
if('id' === columnName){
|
|
133
|
-
|
|
133
|
+
let idType = column.type.toLowerCase();
|
|
134
|
+
propertiesConfig.push(columnName+': {\n dbType: \''+idType+'\'\n }');
|
|
134
135
|
continue;
|
|
135
136
|
}
|
|
136
137
|
let props = this.getPropertyAttributes(column);
|
|
137
138
|
if(0 === props.length){
|
|
138
|
-
|
|
139
|
+
let dbType = column.type.toLowerCase();
|
|
140
|
+
propertiesConfig.push(propertyKey+': {\n dbType: \''+dbType+'\'\n }');
|
|
139
141
|
continue;
|
|
140
142
|
}
|
|
141
143
|
propertiesConfig.push(
|
|
@@ -151,6 +153,7 @@ class EntitiesGeneration extends BaseGenerator
|
|
|
151
153
|
let type = column.type.toLowerCase();
|
|
152
154
|
this.addTypeAttribute(props, column, type);
|
|
153
155
|
this.addRequiredAttribute(props, column);
|
|
156
|
+
props.push('dbType: \''+type+'\'');
|
|
154
157
|
return props;
|
|
155
158
|
}
|
|
156
159
|
|