metal-orm 1.0.113 → 1.0.114
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.
- package/dist/index.cjs +15 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/dto/openapi/type-mappings.ts +207 -191
package/dist/index.cjs
CHANGED
|
@@ -48,6 +48,7 @@ __export(index_exports, {
|
|
|
48
48
|
BelongsTo: () => BelongsTo,
|
|
49
49
|
BelongsToMany: () => BelongsToMany,
|
|
50
50
|
BigIntTypeStrategy: () => BigIntTypeStrategy,
|
|
51
|
+
BinaryTypeStrategy: () => BinaryTypeStrategy,
|
|
51
52
|
BooleanTypeStrategy: () => BooleanTypeStrategy,
|
|
52
53
|
CEP: () => CEP,
|
|
53
54
|
CNPJ: () => CNPJ,
|
|
@@ -15073,6 +15074,18 @@ var UuidTypeStrategy = class {
|
|
|
15073
15074
|
return "uuid";
|
|
15074
15075
|
}
|
|
15075
15076
|
};
|
|
15077
|
+
var BinaryTypeStrategy = class {
|
|
15078
|
+
types = ["BLOB", "BINARY", "VARBINARY", "BYTEA"];
|
|
15079
|
+
supports(type) {
|
|
15080
|
+
return this.types.includes(type.toUpperCase());
|
|
15081
|
+
}
|
|
15082
|
+
getOpenApiType() {
|
|
15083
|
+
return "string";
|
|
15084
|
+
}
|
|
15085
|
+
getFormat() {
|
|
15086
|
+
return "byte";
|
|
15087
|
+
}
|
|
15088
|
+
};
|
|
15076
15089
|
var DateTimeTypeStrategy = class {
|
|
15077
15090
|
types = ["DATE", "DATETIME", "TIMESTAMP", "TIMESTAMPTZ"];
|
|
15078
15091
|
supports(type) {
|
|
@@ -15091,9 +15104,6 @@ var StringTypeStrategy = class {
|
|
|
15091
15104
|
"TEXT",
|
|
15092
15105
|
"VARCHAR",
|
|
15093
15106
|
"CHAR",
|
|
15094
|
-
"BINARY",
|
|
15095
|
-
"VARBINARY",
|
|
15096
|
-
"BLOB",
|
|
15097
15107
|
"ENUM"
|
|
15098
15108
|
];
|
|
15099
15109
|
supports(type) {
|
|
@@ -15127,6 +15137,7 @@ var TypeMappingService = class {
|
|
|
15127
15137
|
new BooleanTypeStrategy(),
|
|
15128
15138
|
new DateTimeTypeStrategy(),
|
|
15129
15139
|
new UuidTypeStrategy(),
|
|
15140
|
+
new BinaryTypeStrategy(),
|
|
15130
15141
|
new StringTypeStrategy(),
|
|
15131
15142
|
new DefaultTypeStrategy()
|
|
15132
15143
|
];
|
|
@@ -17329,6 +17340,7 @@ function setTreeParentId(entity, config, parentId) {
|
|
|
17329
17340
|
BelongsTo,
|
|
17330
17341
|
BelongsToMany,
|
|
17331
17342
|
BigIntTypeStrategy,
|
|
17343
|
+
BinaryTypeStrategy,
|
|
17332
17344
|
BooleanTypeStrategy,
|
|
17333
17345
|
CEP,
|
|
17334
17346
|
CNPJ,
|