@cool-digital-solutions/interferir-models 1.4.63 → 1.4.65

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.
@@ -10,6 +10,7 @@ const _config_1 = require("../config");
10
10
  const portiaArticleMiniSchema = new mongoose_1.Schema({
11
11
  slug: { type: String, required: [true, 'slug is required'], unique: true, index: true },
12
12
  url: { type: String, required: [true, 'url is required'], unique: true },
13
+ title: { type: String, default: '' },
13
14
  articleType: {
14
15
  type: String,
15
16
  enum: Object.values(portia_article_type_1.PortiaArticleTypes),
@@ -39,6 +40,14 @@ const portiaArticleMiniSchema = new mongoose_1.Schema({
39
40
  default: [],
40
41
  },
41
42
  mainPortiaArticle: { type: mongoose_1.Schema.Types.ObjectId, ref: 'PortiaArticle', default: null },
43
+ status: {
44
+ type: String,
45
+ enum: Object.values(portia_article_type_1.PortiaArticleStatus),
46
+ required: [true, 'status is required!'],
47
+ default: portia_article_type_1.PortiaArticleStatus.PUBLISH,
48
+ index: true,
49
+ },
50
+ publishDate: { type: Number, default: null, index: true },
42
51
  createdDate: { type: Number, index: -1 },
43
52
  updatedDate: { type: Number, index: -1 },
44
53
  deleteDate: { type: Number, default: null },
@@ -25,10 +25,11 @@
25
25
  import { Types } from 'mongoose';
26
26
  import { ICompany, IIndustry, ITechnology, ISFTag } from './';
27
27
  import { BaseModel, BaseSchema } from '../config';
28
- import { IPortiaArticle, PortiaArticleTypes } from './portia-article.type';
28
+ import { IPortiaArticle, PortiaArticleTypes, PortiaArticleStatus } from './portia-article.type';
29
29
  export interface IPortiaArticleMini extends BaseSchema {
30
30
  slug: string;
31
31
  url: string;
32
+ title: string;
32
33
  articleType: PortiaArticleTypes;
33
34
  categories: string[];
34
35
  companyReferences: Types.ObjectId[] | ICompany[];
@@ -37,6 +38,8 @@ export interface IPortiaArticleMini extends BaseSchema {
37
38
  sfTechnologies: Types.ObjectId[] | ITechnology[];
38
39
  sfTags: Types.ObjectId[] | ISFTag[];
39
40
  mainPortiaArticle: Types.ObjectId | IPortiaArticle;
41
+ status: PortiaArticleStatus;
42
+ publishDate: Number;
40
43
  }
41
44
  export interface IPortiaArticleMiniModel extends BaseModel<IPortiaArticleMini> {
42
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cool-digital-solutions/interferir-models",
3
- "version": "1.4.63",
3
+ "version": "1.4.65",
4
4
  "main": "./dist/index.js",
5
5
  "files": [
6
6
  "dist/**/*"