@cool-digital-solutions/interferir-models 1.4.40 → 1.4.42
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.
|
@@ -38,6 +38,7 @@ const portiaArticleMiniSchema = new mongoose_1.Schema({
|
|
|
38
38
|
type: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'SFTag', index: true }],
|
|
39
39
|
default: [],
|
|
40
40
|
},
|
|
41
|
+
mainPortiaArticle: { type: mongoose_1.Schema.Types.ObjectId, ref: 'PortiaArticle', default: null },
|
|
41
42
|
createdDate: { type: Number, index: -1 },
|
|
42
43
|
updatedDate: { type: Number, index: -1 },
|
|
43
44
|
deleteDate: { type: Number, default: null },
|
|
@@ -106,6 +106,7 @@ portiaArticleSchema.index({
|
|
|
106
106
|
});
|
|
107
107
|
portiaArticleSchema.index({ createdBy: 1, updatedBy: 1 });
|
|
108
108
|
portiaArticleSchema.index({ status: 1, updatedDate: -1 });
|
|
109
|
+
portiaArticleSchema.index({ 'researches.researchId': -1 });
|
|
109
110
|
portiaArticleSchema.pre('save', function (next) {
|
|
110
111
|
const user = express_http_context_1.default.get('user');
|
|
111
112
|
const notUpdatedBy = express_http_context_1.default.get('notUpdatedBy');
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
import { Types } from 'mongoose';
|
|
26
26
|
import { ICompany, IIndustry, ITechnology, ISFTag } from './';
|
|
27
27
|
import { BaseModel, BaseSchema } from '../config';
|
|
28
|
-
import { PortiaArticleTypes } from './portia-article.type';
|
|
28
|
+
import { IPortiaArticle, PortiaArticleTypes } from './portia-article.type';
|
|
29
29
|
export interface IPortiaArticleMini extends BaseSchema {
|
|
30
30
|
slug: string;
|
|
31
31
|
url: string;
|
|
@@ -36,6 +36,7 @@ export interface IPortiaArticleMini extends BaseSchema {
|
|
|
36
36
|
sfIndustries: Types.ObjectId[] | IIndustry[];
|
|
37
37
|
sfTechnologies: Types.ObjectId[] | ITechnology[];
|
|
38
38
|
sfTags: Types.ObjectId[] | ISFTag[];
|
|
39
|
+
mainPortiaArticle: Types.ObjectId | IPortiaArticle;
|
|
39
40
|
}
|
|
40
41
|
export interface IPortiaArticleMiniModel extends BaseModel<IPortiaArticleMini> {
|
|
41
42
|
}
|