@lyxa.ai/core 1.0.285 → 1.0.287
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.
|
@@ -16,8 +16,8 @@ const _1 = require(".");
|
|
|
16
16
|
const sortingOrderHooks_1 = require("../utilities/sortingOrderHooks");
|
|
17
17
|
let Tag = class Tag {
|
|
18
18
|
name;
|
|
19
|
-
image;
|
|
20
19
|
itemType;
|
|
20
|
+
image;
|
|
21
21
|
status;
|
|
22
22
|
isVisible;
|
|
23
23
|
sortingOrder;
|
|
@@ -27,14 +27,14 @@ __decorate([
|
|
|
27
27
|
(0, typegoose_1.prop)({ required: true, type: String, trim: true, maxlength: 30 }),
|
|
28
28
|
__metadata("design:type", String)
|
|
29
29
|
], Tag.prototype, "name", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
32
|
-
__metadata("design:type", String)
|
|
33
|
-
], Tag.prototype, "image", void 0);
|
|
34
30
|
__decorate([
|
|
35
31
|
(0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.ItemType }),
|
|
36
32
|
__metadata("design:type", String)
|
|
37
33
|
], Tag.prototype, "itemType", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typegoose_1.prop)({ type: String }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], Tag.prototype, "image", void 0);
|
|
38
38
|
__decorate([
|
|
39
39
|
(0, typegoose_1.prop)({ type: String, enum: enum_1.Status, default: enum_1.Status.ACTIVE }),
|
|
40
40
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.model.js","sourceRoot":"/","sources":["libraries/mongo/models/tag.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,kDAA2D;AAC3D,wBAA6B;AAE7B,sEAGwC;AAejC,IAAM,GAAG,GAAT,MAAM,GAAG;IAER,IAAI,CAAU;IAGd,KAA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,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC;IAC/F,IAAA,iBAAK,EAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACpC,IAAA,eAAG,EAAM,MAAM,EAAE,KAAK,WAAW,IAAI;QACrC,MAAM,qDAAiC,CAAC,IAAI,CAAC,IAAI,EAAE,WAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAE1F,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;IACD,IAAA,eAAG,EAAM,kBAAkB,EAAE,KAAK,WAAkC,IAAI;QACxE,MAAM,uDAAmC,CAAC,IAAI,CAAC,IAAI,EAAE,WAAQ,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;QAE7E,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;GACW,GAAG,CAkBf","sourcesContent":["import { Index, modelOptions, pre, prop } from '@typegoose/typegoose';\nimport { ItemType, Status } from '../../../utilities/enum';\nimport { TagModel } from '.';\nimport { Query } from 'mongoose';\nimport {\n\thandlePreSaveForSortingWithStatus,\n\thandlePreUpdateForSortingWithStatus,\n} from '../utilities/sortingOrderHooks';\n\n@modelOptions({ schemaOptions: { collection: 'tags' } })\n@Index({ name: 1, itemType: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\n@Index({ itemType: 1, deletedAt: 1 })\n@pre<Tag>('save', async function (next) {\n\tawait handlePreSaveForSortingWithStatus.call(this, TagModel, { itemType: this.itemType });\n\n\tnext();\n})\n@pre<Tag>('findOneAndUpdate', async function (this: Query<any, Tag>, next) {\n\tawait handlePreUpdateForSortingWithStatus.call(this, TagModel, ['itemType']);\n\n\tnext();\n})\nexport class Tag {\n\t@prop({ required: true, type: String, trim: true, maxlength: 30 })\n\tpublic name!: string;\n\n\t@prop({ required: true, type: String, enum: ItemType })\n\tpublic itemType!: ItemType;\n\n\t@prop({ type: String })\n\tpublic image?: string;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ type: Boolean, default: true })\n\tpublic isVisible?: boolean;\n\n\t@prop({ type: Number })\n\tpublic sortingOrder?: number;\n}\n"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED