@grapadigital/shared-schemas 1.0.185 → 1.0.187

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.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './schemas/action.schema';
2
2
  export * from './schemas/client.schema';
3
3
  export * from './schemas/content.schema';
4
+ export * from './schemas/comment.schema';
4
5
  export * from './schemas/influencer.schema';
5
6
  export * from './schemas/supplier.schema';
6
7
  export * from './schemas/campaign.schema';
package/dist/index.js CHANGED
@@ -18,6 +18,7 @@ exports.NoteMentionSchema = exports.NoteMention = exports.NoteSchema = exports.N
18
18
  __exportStar(require("./schemas/action.schema"), exports);
19
19
  __exportStar(require("./schemas/client.schema"), exports);
20
20
  __exportStar(require("./schemas/content.schema"), exports);
21
+ __exportStar(require("./schemas/comment.schema"), exports);
21
22
  __exportStar(require("./schemas/influencer.schema"), exports);
22
23
  __exportStar(require("./schemas/supplier.schema"), exports);
23
24
  __exportStar(require("./schemas/campaign.schema"), exports);
@@ -94,6 +94,20 @@ export declare const NicheItemSchema: import("mongoose").Schema<NicheItem, impor
94
94
  } & {
95
95
  __v: number;
96
96
  }>;
97
+ export declare class Responsable {
98
+ name: string;
99
+ team: string;
100
+ email: string;
101
+ }
102
+ export declare const ResponsableSchema: import("mongoose").Schema<Responsable, import("mongoose").Model<Responsable, any, any, any, import("mongoose").Document<unknown, any, Responsable, any, {}> & Responsable & {
103
+ _id: import("mongoose").Types.ObjectId;
104
+ } & {
105
+ __v: number;
106
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Responsable, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Responsable>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Responsable> & {
107
+ _id: import("mongoose").Types.ObjectId;
108
+ } & {
109
+ __v: number;
110
+ }>;
97
111
  export declare class Client extends Party {
98
112
  clusters: Cluster[];
99
113
  companies: Company[];
@@ -108,6 +122,8 @@ export declare class Client extends Party {
108
122
  * time já resolve (padrão da maioria dos clientes). Ver GD-532/GD-535.
109
123
  */
110
124
  requiredTeams: string[];
125
+ hasReport: boolean;
126
+ reportResponsable?: Responsable;
111
127
  }
112
128
  export declare const ClientSchema: import("mongoose").Schema<Client, import("mongoose").Model<Client, any, any, any, import("mongoose").Document<unknown, any, Client, any, {}> & Client & Required<{
113
129
  _id: import("mongoose").Types.ObjectId;
@@ -9,8 +9,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ClientModel = exports.ClientSchema = exports.Client = exports.NicheItemSchema = exports.NicheItem = exports.AgencyCommissionPeriodSchema = exports.AgencyCommissionPeriod = exports.CommissionRangeSchema = exports.CommissionRange = exports.CompanySchema = exports.Company = exports.ClusterSchema = exports.Cluster = void 0;
12
+ exports.ClientModel = exports.ClientSchema = exports.Client = exports.ResponsableSchema = exports.Responsable = exports.NicheItemSchema = exports.NicheItem = exports.AgencyCommissionPeriodSchema = exports.AgencyCommissionPeriod = exports.CommissionRangeSchema = exports.CommissionRange = exports.CompanySchema = exports.Company = exports.ClusterSchema = exports.Cluster = void 0;
13
13
  const mongoose_1 = require("@nestjs/mongoose");
14
+ const swagger_1 = require("@nestjs/swagger");
14
15
  const mongoose_2 = require("mongoose");
15
16
  const party_schema_1 = require("./party.schema");
16
17
  let Cluster = class Cluster {
@@ -100,6 +101,28 @@ NicheItem = __decorate([
100
101
  ], NicheItem);
101
102
  exports.NicheItem = NicheItem;
102
103
  exports.NicheItemSchema = mongoose_1.SchemaFactory.createForClass(NicheItem);
104
+ let Responsable = class Responsable {
105
+ };
106
+ __decorate([
107
+ (0, swagger_1.ApiProperty)({ example: 'Maria Oliveira' }),
108
+ (0, mongoose_1.Prop)(),
109
+ __metadata("design:type", String)
110
+ ], Responsable.prototype, "name", void 0);
111
+ __decorate([
112
+ (0, swagger_1.ApiProperty)({ example: 'Comercial' }),
113
+ (0, mongoose_1.Prop)(),
114
+ __metadata("design:type", String)
115
+ ], Responsable.prototype, "team", void 0);
116
+ __decorate([
117
+ (0, swagger_1.ApiProperty)({ example: 'maria@empresa.com' }),
118
+ (0, mongoose_1.Prop)(),
119
+ __metadata("design:type", String)
120
+ ], Responsable.prototype, "email", void 0);
121
+ Responsable = __decorate([
122
+ (0, mongoose_1.Schema)({ _id: false })
123
+ ], Responsable);
124
+ exports.Responsable = Responsable;
125
+ exports.ResponsableSchema = mongoose_1.SchemaFactory.createForClass(Responsable);
103
126
  let Client = class Client extends party_schema_1.Party {
104
127
  };
105
128
  __decorate([
@@ -138,6 +161,14 @@ __decorate([
138
161
  (0, mongoose_1.Prop)({ type: [String], default: [] }),
139
162
  __metadata("design:type", Array)
140
163
  ], Client.prototype, "requiredTeams", void 0);
164
+ __decorate([
165
+ (0, mongoose_1.Prop)({ type: Boolean, default: false }),
166
+ __metadata("design:type", Boolean)
167
+ ], Client.prototype, "hasReport", void 0);
168
+ __decorate([
169
+ (0, mongoose_1.Prop)({ type: exports.ResponsableSchema, required: false }),
170
+ __metadata("design:type", Responsable)
171
+ ], Client.prototype, "reportResponsable", void 0);
141
172
  Client = __decorate([
142
173
  (0, mongoose_1.Schema)({ timestamps: true })
143
174
  ], Client);
@@ -0,0 +1,72 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/session" />
19
+ /// <reference types="mongoose/types/types" />
20
+ /// <reference types="mongoose/types/utility" />
21
+ /// <reference types="mongoose/types/validation" />
22
+ /// <reference types="mongoose/types/virtuals" />
23
+ /// <reference types="mongoose/types/schematypes" />
24
+ /// <reference types="mongoose/types/inferschematype" />
25
+ /// <reference types="mongoose/types/inferrawdoctype" />
26
+ import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
27
+ import { Content } from './content.schema';
28
+ import { Action } from './action.schema';
29
+ export type CommentDocument = HydratedDocument<Comment>;
30
+ export declare class Comment {
31
+ _id?: Types.ObjectId;
32
+ content: Types.ObjectId | Content;
33
+ action: Types.ObjectId | Action;
34
+ externalId: string;
35
+ author: string;
36
+ authorProfileUrl?: string | null;
37
+ authorThumbnailUrl?: string | null;
38
+ text: string;
39
+ url?: string | null;
40
+ postedAt: Date;
41
+ likeCount?: number;
42
+ parent?: Types.ObjectId | Comment | null;
43
+ target?: ('brand' | 'influencer' | 'content' | 'emoji' | 'spam')[];
44
+ polarity?: 'positive' | 'negative' | 'neutral' | null;
45
+ funnel?: 'awareness' | 'consideration' | 'conversion' | null;
46
+ isEmojiOnly?: boolean;
47
+ isSpam?: boolean;
48
+ createdAt?: Date;
49
+ updatedAt?: Date;
50
+ }
51
+ export declare const CommentSchema: MongooseSchema<Comment, import("mongoose").Model<Comment, any, any, any, import("mongoose").Document<unknown, any, Comment, any, {}> & Comment & Required<{
52
+ _id: Types.ObjectId;
53
+ }> & {
54
+ __v: number;
55
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Comment, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Comment>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Comment> & Required<{
56
+ _id: Types.ObjectId;
57
+ }> & {
58
+ __v: number;
59
+ }>;
60
+ export declare const CommentModel: import("mongoose").Model<Comment, {}, {}, {}, import("mongoose").Document<unknown, {}, Comment, {}, import("mongoose").DefaultSchemaOptions> & Comment & Required<{
61
+ _id: Types.ObjectId;
62
+ }> & {
63
+ __v: number;
64
+ }, MongooseSchema<Comment, import("mongoose").Model<Comment, any, any, any, import("mongoose").Document<unknown, any, Comment, any, {}> & Comment & Required<{
65
+ _id: Types.ObjectId;
66
+ }> & {
67
+ __v: number;
68
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Comment, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Comment>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Comment> & Required<{
69
+ _id: Types.ObjectId;
70
+ }> & {
71
+ __v: number;
72
+ }>>;
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CommentModel = exports.CommentSchema = exports.Comment = void 0;
13
+ const mongoose_1 = require("@nestjs/mongoose");
14
+ const mongoose_2 = require("mongoose");
15
+ let Comment = class Comment {
16
+ };
17
+ __decorate([
18
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, auto: true, required: false }),
19
+ __metadata("design:type", mongoose_2.Types.ObjectId)
20
+ ], Comment.prototype, "_id", void 0);
21
+ __decorate([
22
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Content', required: true }),
23
+ __metadata("design:type", Object)
24
+ ], Comment.prototype, "content", void 0);
25
+ __decorate([
26
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Action', required: true }),
27
+ __metadata("design:type", Object)
28
+ ], Comment.prototype, "action", void 0);
29
+ __decorate([
30
+ (0, mongoose_1.Prop)({ type: String, required: true }),
31
+ __metadata("design:type", String)
32
+ ], Comment.prototype, "externalId", void 0);
33
+ __decorate([
34
+ (0, mongoose_1.Prop)({ type: String, required: true }),
35
+ __metadata("design:type", String)
36
+ ], Comment.prototype, "author", void 0);
37
+ __decorate([
38
+ (0, mongoose_1.Prop)({ type: String, required: false, default: null }),
39
+ __metadata("design:type", Object)
40
+ ], Comment.prototype, "authorProfileUrl", void 0);
41
+ __decorate([
42
+ (0, mongoose_1.Prop)({ type: String, required: false, default: null }),
43
+ __metadata("design:type", Object)
44
+ ], Comment.prototype, "authorThumbnailUrl", void 0);
45
+ __decorate([
46
+ (0, mongoose_1.Prop)({ type: String, required: true }),
47
+ __metadata("design:type", String)
48
+ ], Comment.prototype, "text", void 0);
49
+ __decorate([
50
+ (0, mongoose_1.Prop)({ type: String, required: false, default: null }),
51
+ __metadata("design:type", Object)
52
+ ], Comment.prototype, "url", void 0);
53
+ __decorate([
54
+ (0, mongoose_1.Prop)({ type: Date, required: true }),
55
+ __metadata("design:type", Date)
56
+ ], Comment.prototype, "postedAt", void 0);
57
+ __decorate([
58
+ (0, mongoose_1.Prop)({ type: Number, required: false, default: 0 }),
59
+ __metadata("design:type", Number)
60
+ ], Comment.prototype, "likeCount", void 0);
61
+ __decorate([
62
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Comment', required: false, default: null }),
63
+ __metadata("design:type", Object)
64
+ ], Comment.prototype, "parent", void 0);
65
+ __decorate([
66
+ (0, mongoose_1.Prop)({
67
+ type: [String],
68
+ enum: ['brand', 'influencer', 'content', 'emoji', 'spam'],
69
+ required: false,
70
+ default: [],
71
+ }),
72
+ __metadata("design:type", Array)
73
+ ], Comment.prototype, "target", void 0);
74
+ __decorate([
75
+ (0, mongoose_1.Prop)({
76
+ type: String,
77
+ enum: ['positive', 'negative', 'neutral'],
78
+ required: false,
79
+ default: null,
80
+ }),
81
+ __metadata("design:type", Object)
82
+ ], Comment.prototype, "polarity", void 0);
83
+ __decorate([
84
+ (0, mongoose_1.Prop)({
85
+ type: String,
86
+ enum: ['awareness', 'consideration', 'conversion'],
87
+ required: false,
88
+ default: null,
89
+ }),
90
+ __metadata("design:type", Object)
91
+ ], Comment.prototype, "funnel", void 0);
92
+ __decorate([
93
+ (0, mongoose_1.Prop)({ type: Boolean, required: false, default: false }),
94
+ __metadata("design:type", Boolean)
95
+ ], Comment.prototype, "isEmojiOnly", void 0);
96
+ __decorate([
97
+ (0, mongoose_1.Prop)({ type: Boolean, required: false, default: false }),
98
+ __metadata("design:type", Boolean)
99
+ ], Comment.prototype, "isSpam", void 0);
100
+ __decorate([
101
+ (0, mongoose_1.Prop)({ default: Date.now, required: false }),
102
+ __metadata("design:type", Date)
103
+ ], Comment.prototype, "createdAt", void 0);
104
+ __decorate([
105
+ (0, mongoose_1.Prop)({ default: Date.now, required: false }),
106
+ __metadata("design:type", Date)
107
+ ], Comment.prototype, "updatedAt", void 0);
108
+ Comment = __decorate([
109
+ (0, mongoose_1.Schema)({ timestamps: true })
110
+ ], Comment);
111
+ exports.Comment = Comment;
112
+ exports.CommentSchema = mongoose_1.SchemaFactory.createForClass(Comment);
113
+ exports.CommentSchema.index({ content: 1, externalId: 1 }, { unique: true });
114
+ exports.CommentSchema.index({ action: 1, funnel: 1 });
115
+ exports.CommentSchema.index({ action: 1, target: 1 });
116
+ exports.CommentSchema.index({ content: 1, parent: 1 });
117
+ exports.CommentModel = (0, mongoose_2.model)('Comment', exports.CommentSchema);
@@ -32,6 +32,10 @@ export declare class Advisor {
32
32
  legalName: string;
33
33
  document: string;
34
34
  phone: string;
35
+ bank: string;
36
+ agency: string;
37
+ account: string;
38
+ digit: string;
35
39
  }
36
40
  export declare const AdvisorSchema: MongooseSchema<Advisor, import("mongoose").Model<Advisor, any, any, any, import("mongoose").Document<unknown, any, Advisor, any, {}> & Advisor & {
37
41
  _id: Types.ObjectId;
@@ -31,6 +31,22 @@ __decorate([
31
31
  (0, mongoose_1.Prop)(),
32
32
  __metadata("design:type", String)
33
33
  ], Advisor.prototype, "phone", void 0);
34
+ __decorate([
35
+ (0, mongoose_1.Prop)(),
36
+ __metadata("design:type", String)
37
+ ], Advisor.prototype, "bank", void 0);
38
+ __decorate([
39
+ (0, mongoose_1.Prop)(),
40
+ __metadata("design:type", String)
41
+ ], Advisor.prototype, "agency", void 0);
42
+ __decorate([
43
+ (0, mongoose_1.Prop)(),
44
+ __metadata("design:type", String)
45
+ ], Advisor.prototype, "account", void 0);
46
+ __decorate([
47
+ (0, mongoose_1.Prop)(),
48
+ __metadata("design:type", String)
49
+ ], Advisor.prototype, "digit", void 0);
34
50
  Advisor = __decorate([
35
51
  (0, mongoose_1.Schema)({ _id: false })
36
52
  ], Advisor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grapadigital/shared-schemas",
3
- "version": "1.0.185",
3
+ "version": "1.0.187",
4
4
  "description": "Shared Mongoose Schemas",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/index.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './schemas/action.schema';
2
2
  export * from './schemas/client.schema';
3
3
  export * from './schemas/content.schema';
4
+ export * from './schemas/comment.schema';
4
5
  export * from './schemas/influencer.schema';
5
6
  export * from './schemas/supplier.schema';
6
7
  export * from './schemas/campaign.schema';
@@ -1,4 +1,5 @@
1
1
  import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
2
+ import { ApiProperty } from '@nestjs/swagger';
2
3
  import { HydratedDocument, model as MongooseModel } from 'mongoose';
3
4
  import { Party } from './party.schema';
4
5
 
@@ -68,6 +69,23 @@ export class NicheItem {
68
69
 
69
70
  export const NicheItemSchema = SchemaFactory.createForClass(NicheItem);
70
71
 
72
+ @Schema({ _id: false })
73
+ export class Responsable {
74
+ @ApiProperty({ example: 'Maria Oliveira' })
75
+ @Prop()
76
+ name: string;
77
+
78
+ @ApiProperty({ example: 'Comercial' })
79
+ @Prop()
80
+ team: string;
81
+
82
+ @ApiProperty({ example: 'maria@empresa.com' })
83
+ @Prop()
84
+ email: string;
85
+ }
86
+
87
+ export const ResponsableSchema = SchemaFactory.createForClass(Responsable);
88
+
71
89
  @Schema({ timestamps: true })
72
90
  export class Client extends Party {
73
91
  @Prop({ type: [ClusterSchema], default: [] })
@@ -102,6 +120,12 @@ export class Client extends Party {
102
120
  */
103
121
  @Prop({ type: [String], default: [] })
104
122
  requiredTeams: string[];
123
+
124
+ @Prop({ type: Boolean, default: false })
125
+ hasReport: boolean;
126
+
127
+ @Prop({ type: ResponsableSchema, required: false })
128
+ reportResponsable?: Responsable;
105
129
  }
106
130
 
107
131
  export const ClientSchema = SchemaFactory.createForClass(Client);
@@ -0,0 +1,95 @@
1
+ import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
2
+ import {
3
+ HydratedDocument,
4
+ Schema as MongooseSchema,
5
+ Types,
6
+ model as MongooseModel,
7
+ } from 'mongoose';
8
+ import { Content } from './content.schema';
9
+ import { Action } from './action.schema';
10
+
11
+ export type CommentDocument = HydratedDocument<Comment>;
12
+
13
+ @Schema({ timestamps: true })
14
+ export class Comment {
15
+ @Prop({ type: MongooseSchema.Types.ObjectId, auto: true, required: false })
16
+ _id?: Types.ObjectId;
17
+
18
+ @Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Content', required: true })
19
+ content: Types.ObjectId | Content;
20
+
21
+ @Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Action', required: true })
22
+ action: Types.ObjectId | Action;
23
+
24
+ @Prop({ type: String, required: true })
25
+ externalId: string;
26
+
27
+ @Prop({ type: String, required: true })
28
+ author: string;
29
+
30
+ @Prop({ type: String, required: false, default: null })
31
+ authorProfileUrl?: string | null;
32
+
33
+ @Prop({ type: String, required: false, default: null })
34
+ authorThumbnailUrl?: string | null;
35
+
36
+ @Prop({ type: String, required: true })
37
+ text: string;
38
+
39
+ @Prop({ type: String, required: false, default: null })
40
+ url?: string | null;
41
+
42
+ @Prop({ type: Date, required: true })
43
+ postedAt: Date;
44
+
45
+ @Prop({ type: Number, required: false, default: 0 })
46
+ likeCount?: number;
47
+
48
+ @Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Comment', required: false, default: null })
49
+ parent?: Types.ObjectId | Comment | null;
50
+
51
+ @Prop({
52
+ type: [String],
53
+ enum: ['brand', 'influencer', 'content', 'emoji', 'spam'],
54
+ required: false,
55
+ default: [],
56
+ })
57
+ target?: ('brand' | 'influencer' | 'content' | 'emoji' | 'spam')[];
58
+
59
+ @Prop({
60
+ type: String,
61
+ enum: ['positive', 'negative', 'neutral'],
62
+ required: false,
63
+ default: null,
64
+ })
65
+ polarity?: 'positive' | 'negative' | 'neutral' | null;
66
+
67
+ @Prop({
68
+ type: String,
69
+ enum: ['awareness', 'consideration', 'conversion'],
70
+ required: false,
71
+ default: null,
72
+ })
73
+ funnel?: 'awareness' | 'consideration' | 'conversion' | null;
74
+
75
+ @Prop({ type: Boolean, required: false, default: false })
76
+ isEmojiOnly?: boolean;
77
+
78
+ @Prop({ type: Boolean, required: false, default: false })
79
+ isSpam?: boolean;
80
+
81
+ @Prop({ default: Date.now, required: false })
82
+ createdAt?: Date;
83
+
84
+ @Prop({ default: Date.now, required: false })
85
+ updatedAt?: Date;
86
+ }
87
+
88
+ export const CommentSchema = SchemaFactory.createForClass(Comment);
89
+
90
+ CommentSchema.index({ content: 1, externalId: 1 }, { unique: true });
91
+ CommentSchema.index({ action: 1, funnel: 1 });
92
+ CommentSchema.index({ action: 1, target: 1 });
93
+ CommentSchema.index({ content: 1, parent: 1 });
94
+
95
+ export const CommentModel = MongooseModel('Comment', CommentSchema);
@@ -17,6 +17,18 @@ export class Advisor {
17
17
 
18
18
  @Prop()
19
19
  phone: string;
20
+
21
+ @Prop()
22
+ bank: string;
23
+
24
+ @Prop()
25
+ agency: string;
26
+
27
+ @Prop()
28
+ account: string;
29
+
30
+ @Prop()
31
+ digit: string;
20
32
  }
21
33
 
22
34
  export const AdvisorSchema = SchemaFactory.createForClass(Advisor);