nicot 1.1.37 → 1.1.38

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/README.md CHANGED
@@ -135,14 +135,18 @@ NICOT 提供了一系列 `***Column()` 装饰器,统一处理字段的:
135
135
 
136
136
  ### 字段类型装饰器(`***Column()`)
137
137
 
138
- | 装饰器名 | 数据类型 | 自动添加的验证与文档 |
139
- |----------------------|----------------|---------------------------------|
140
- | `@StringColumn(len)` | string | `@IsString()` + `@Length()` |
141
- | `@IntColumn(type)` | int/bigint/... | `@IsInt()` + Swagger number 类型 |
142
- | `@FloatColumn(type)` | float/decimal | `@IsNumber()` |
143
- | `@BoolColumn()` | boolean | `@IsBoolean()` |
144
- | `@DateColumn()` | Date | `@IsDate()` |
145
- | `@JsonColumn(T)` | 任意对象/数组 | `@IsObject()` / `@ValidateNested()` 等 |
138
+ | 装饰器名 | 数据类型 | 自动添加的验证与文档 |
139
+ |------------------------|-----------------|---------------------------------------|
140
+ | `@StringColumn(len)` | varchar | `@IsString()` + `@Length()` |
141
+ | `@TextColumn()` | text | `@IsString()` |
142
+ | `@UuidColumn()` | uuid | `@IsUUID()` |
143
+ | `@IntColumn(type)` | int/bigint/... | `@IsInt()` + Swagger number 类型 |
144
+ | `@FloatColumn(type)` | float/decimal | `@IsNumber()` |
145
+ | `@BoolColumn()` | boolean | `@IsBoolean()` |
146
+ | `@DateColumn()` | Date | `@IsDate()` |
147
+ | `@JsonColumn(T)` | 任意对象/数组 (jsonb) | `@IsObject()` / `@ValidateNested()` 等 |
148
+ | `@SimpleJsonColumn(T)` | 任意对象/数组 (json) | `@IsObject()` / `@ValidateNested()` 等 |
149
+ | `@StringJsonColumn(T)` | 任意对象/数组 (text) | `@IsObject()` / `@ValidateNested()` 等 |
146
150
 
147
151
  所有字段装饰器都支持第二个参数 `options`:
148
152
 
package/dist/index.cjs CHANGED
@@ -1370,7 +1370,7 @@ var CrudBase = class {
1370
1370
  delete o[field];
1371
1371
  }
1372
1372
  visited.add(o);
1373
- for (const relation of this._typeormRelations) {
1373
+ for (const relation of getTypeormRelations(cl)) {
1374
1374
  const propertyName = relation.propertyName;
1375
1375
  if (o[propertyName]) {
1376
1376
  if (Array.isArray(o[propertyName])) {