@grapadigital/shared-schemas 1.0.139 → 1.0.141
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/schemas/action.schema.d.ts +7 -0
- package/dist/schemas/action.schema.js +23 -0
- package/dist/schemas/campaign.schema.d.ts +0 -7
- package/dist/schemas/campaign.schema.js +0 -21
- package/dist/schemas/commission.schema.d.ts +1 -0
- package/dist/schemas/commission.schema.js +4 -0
- package/dist/schemas/influencer.schema.d.ts +15 -0
- package/dist/schemas/influencer.schema.js +24 -1
- package/dist/schemas/payment.schema.d.ts +0 -9
- package/dist/schemas/payment.schema.js +1 -2
- package/dist/schemas/recruitment.schema.d.ts +0 -6
- package/dist/schemas/recruitment.schema.js +0 -21
- package/dist/schemas/sale.schema.js +8 -8
- package/dist/schemas/user.schema.d.ts +1 -0
- package/dist/schemas/user.schema.js +4 -0
- package/package.json +1 -1
- package/src/schemas/action.schema.ts +13 -0
- package/src/schemas/campaign.schema.ts +0 -10
- package/src/schemas/commission.schema.ts +3 -0
- package/src/schemas/influencer.schema.ts +15 -0
- package/src/schemas/payment.schema.ts +0 -1
- package/src/schemas/recruitment.schema.ts +0 -11
- package/src/schemas/sale.schema.ts +11 -11
- package/src/schemas/user.schema.ts +3 -0
|
@@ -56,6 +56,11 @@ export declare const ResponsiblesSchema: MongooseSchema<Responsibles, import("mo
|
|
|
56
56
|
} & {
|
|
57
57
|
__v: number;
|
|
58
58
|
}>;
|
|
59
|
+
declare class Note {
|
|
60
|
+
text: string;
|
|
61
|
+
owner: string;
|
|
62
|
+
createdAt: Date;
|
|
63
|
+
}
|
|
59
64
|
export declare class Action {
|
|
60
65
|
_id?: Types.ObjectId;
|
|
61
66
|
title: string;
|
|
@@ -85,6 +90,7 @@ export declare class Action {
|
|
|
85
90
|
BISheets?: string;
|
|
86
91
|
createdAt?: Date;
|
|
87
92
|
updatedAt?: Date;
|
|
93
|
+
notes?: Note[];
|
|
88
94
|
}
|
|
89
95
|
export declare const ActionSchema: MongooseSchema<Action, import("mongoose").Model<Action, any, any, any, import("mongoose").Document<unknown, any, Action, any, {}> & Action & Required<{
|
|
90
96
|
_id: Types.ObjectId;
|
|
@@ -108,3 +114,4 @@ export declare const ActionModel: import("mongoose").Model<Action, {}, {}, {}, i
|
|
|
108
114
|
}> & {
|
|
109
115
|
__v: number;
|
|
110
116
|
}>>;
|
|
117
|
+
export {};
|
|
@@ -56,6 +56,24 @@ Responsibles = __decorate([
|
|
|
56
56
|
], Responsibles);
|
|
57
57
|
exports.Responsibles = Responsibles;
|
|
58
58
|
exports.ResponsiblesSchema = mongoose_1.SchemaFactory.createForClass(Responsibles);
|
|
59
|
+
let Note = class Note {
|
|
60
|
+
};
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], Note.prototype, "text", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], Note.prototype, "owner", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
71
|
+
__metadata("design:type", Date)
|
|
72
|
+
], Note.prototype, "createdAt", void 0);
|
|
73
|
+
Note = __decorate([
|
|
74
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
75
|
+
], Note);
|
|
76
|
+
const NoteSchema = mongoose_1.SchemaFactory.createForClass(Note);
|
|
59
77
|
let Action = class Action {
|
|
60
78
|
};
|
|
61
79
|
__decorate([
|
|
@@ -214,6 +232,11 @@ __decorate([
|
|
|
214
232
|
(0, mongoose_1.Prop)({ type: Date, default: Date.now, required: false }),
|
|
215
233
|
__metadata("design:type", Date)
|
|
216
234
|
], Action.prototype, "updatedAt", void 0);
|
|
235
|
+
__decorate([
|
|
236
|
+
(0, swagger_1.ApiProperty)({ type: () => [Note], required: false }),
|
|
237
|
+
(0, mongoose_1.Prop)({ type: [NoteSchema], required: false }),
|
|
238
|
+
__metadata("design:type", Array)
|
|
239
|
+
], Action.prototype, "notes", void 0);
|
|
217
240
|
Action = __decorate([
|
|
218
241
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
219
242
|
], Action);
|
|
@@ -26,16 +26,10 @@
|
|
|
26
26
|
import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
|
|
27
27
|
import { Client } from './client.schema';
|
|
28
28
|
export type CampaignDocument = HydratedDocument<Campaign>;
|
|
29
|
-
declare class Note {
|
|
30
|
-
text: string;
|
|
31
|
-
owner: string;
|
|
32
|
-
createdAt: Date;
|
|
33
|
-
}
|
|
34
29
|
export declare class Campaign {
|
|
35
30
|
_id?: Types.ObjectId;
|
|
36
31
|
title: string;
|
|
37
32
|
client: Types.ObjectId | Client;
|
|
38
|
-
notes?: Note[];
|
|
39
33
|
createdAt?: Date;
|
|
40
34
|
updatedAt?: Date;
|
|
41
35
|
}
|
|
@@ -61,4 +55,3 @@ export declare const CampaignModel: import("mongoose").Model<Campaign, {}, {}, {
|
|
|
61
55
|
}> & {
|
|
62
56
|
__v: number;
|
|
63
57
|
}>>;
|
|
64
|
-
export {};
|
|
@@ -12,23 +12,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.CampaignModel = exports.CampaignSchema = exports.Campaign = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
|
-
let Note = class Note {
|
|
16
|
-
};
|
|
17
|
-
__decorate([
|
|
18
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
19
|
-
__metadata("design:type", String)
|
|
20
|
-
], Note.prototype, "text", void 0);
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
23
|
-
__metadata("design:type", String)
|
|
24
|
-
], Note.prototype, "owner", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
27
|
-
__metadata("design:type", Date)
|
|
28
|
-
], Note.prototype, "createdAt", void 0);
|
|
29
|
-
Note = __decorate([
|
|
30
|
-
(0, mongoose_1.Schema)({ _id: false })
|
|
31
|
-
], Note);
|
|
32
15
|
let Campaign = class Campaign {
|
|
33
16
|
};
|
|
34
17
|
__decorate([
|
|
@@ -43,10 +26,6 @@ __decorate([
|
|
|
43
26
|
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Client' }),
|
|
44
27
|
__metadata("design:type", Object)
|
|
45
28
|
], Campaign.prototype, "client", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, mongoose_1.Prop)([{ type: Note, required: false }]),
|
|
48
|
-
__metadata("design:type", Array)
|
|
49
|
-
], Campaign.prototype, "notes", void 0);
|
|
50
29
|
__decorate([
|
|
51
30
|
(0, mongoose_1.Prop)({ default: Date.now, required: false }),
|
|
52
31
|
__metadata("design:type", Date)
|
|
@@ -45,6 +45,7 @@ export declare class Commission {
|
|
|
45
45
|
description?: string;
|
|
46
46
|
createdAt?: Date;
|
|
47
47
|
updatedAt?: Date;
|
|
48
|
+
organization?: Types.ObjectId;
|
|
48
49
|
}
|
|
49
50
|
export declare const CommissionSchema: MongooseSchema<Commission, import("mongoose").Model<Commission, any, any, any, import("mongoose").Document<unknown, any, Commission, any, {}> & Commission & Required<{
|
|
50
51
|
_id: Types.ObjectId;
|
|
@@ -100,6 +100,10 @@ __decorate([
|
|
|
100
100
|
(0, mongoose_1.Prop)({ type: Date, default: Date.now, required: false }),
|
|
101
101
|
__metadata("design:type", Date)
|
|
102
102
|
], Commission.prototype, "updatedAt", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, required: false }),
|
|
105
|
+
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
106
|
+
], Commission.prototype, "organization", void 0);
|
|
103
107
|
Commission = __decorate([
|
|
104
108
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
105
109
|
], Commission);
|
|
@@ -42,11 +42,26 @@ export declare const AdvisorSchema: MongooseSchema<Advisor, import("mongoose").M
|
|
|
42
42
|
} & {
|
|
43
43
|
__v: number;
|
|
44
44
|
}>;
|
|
45
|
+
export declare class Note {
|
|
46
|
+
text: string;
|
|
47
|
+
owner: string;
|
|
48
|
+
createdAt: Date;
|
|
49
|
+
}
|
|
50
|
+
export declare const NoteSchema: MongooseSchema<Note, import("mongoose").Model<Note, any, any, any, import("mongoose").Document<unknown, any, Note, any, {}> & Note & {
|
|
51
|
+
_id: Types.ObjectId;
|
|
52
|
+
} & {
|
|
53
|
+
__v: number;
|
|
54
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Note, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Note>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Note> & {
|
|
55
|
+
_id: Types.ObjectId;
|
|
56
|
+
} & {
|
|
57
|
+
__v: number;
|
|
58
|
+
}>;
|
|
45
59
|
export declare class Influencer extends User {
|
|
46
60
|
financialManagementSheet?: string;
|
|
47
61
|
isExclusive: boolean;
|
|
48
62
|
advisor?: Advisor;
|
|
49
63
|
profiles?: Types.ObjectId[] | Profile[];
|
|
64
|
+
notes?: Note[];
|
|
50
65
|
}
|
|
51
66
|
export declare const InfluencerSchema: MongooseSchema<Influencer, import("mongoose").Model<Influencer, any, any, any, import("mongoose").Document<unknown, any, Influencer, any, {}> & Influencer & Required<{
|
|
52
67
|
_id: Types.ObjectId;
|
|
@@ -9,7 +9,7 @@ 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.InfluencerModel = exports.InfluencerSchema = exports.Influencer = exports.AdvisorSchema = exports.Advisor = void 0;
|
|
12
|
+
exports.InfluencerModel = exports.InfluencerSchema = exports.Influencer = exports.NoteSchema = exports.Note = exports.AdvisorSchema = exports.Advisor = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
15
|
const user_schema_1 = require("./user.schema");
|
|
@@ -36,6 +36,25 @@ Advisor = __decorate([
|
|
|
36
36
|
], Advisor);
|
|
37
37
|
exports.Advisor = Advisor;
|
|
38
38
|
exports.AdvisorSchema = mongoose_1.SchemaFactory.createForClass(Advisor);
|
|
39
|
+
let Note = class Note {
|
|
40
|
+
};
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, mongoose_1.Prop)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], Note.prototype, "text", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, mongoose_1.Prop)(),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], Note.prototype, "owner", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, mongoose_1.Prop)({ type: Date, default: Date.now }),
|
|
51
|
+
__metadata("design:type", Date)
|
|
52
|
+
], Note.prototype, "createdAt", void 0);
|
|
53
|
+
Note = __decorate([
|
|
54
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
55
|
+
], Note);
|
|
56
|
+
exports.Note = Note;
|
|
57
|
+
exports.NoteSchema = mongoose_1.SchemaFactory.createForClass(Note);
|
|
39
58
|
let Influencer = class Influencer extends user_schema_1.User {
|
|
40
59
|
};
|
|
41
60
|
__decorate([
|
|
@@ -56,6 +75,10 @@ __decorate([
|
|
|
56
75
|
]),
|
|
57
76
|
__metadata("design:type", Array)
|
|
58
77
|
], Influencer.prototype, "profiles", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, mongoose_1.Prop)({ type: [exports.NoteSchema], required: false }),
|
|
80
|
+
__metadata("design:type", Array)
|
|
81
|
+
], Influencer.prototype, "notes", void 0);
|
|
59
82
|
Influencer = __decorate([
|
|
60
83
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
61
84
|
], Influencer);
|
|
@@ -127,15 +127,6 @@ declare class Note {
|
|
|
127
127
|
owner: string;
|
|
128
128
|
createdAt: Date;
|
|
129
129
|
}
|
|
130
|
-
export declare const NoteSchema: MongooseSchema<Note, import("mongoose").Model<Note, any, any, any, import("mongoose").Document<unknown, any, Note, any, {}> & Note & {
|
|
131
|
-
_id: Types.ObjectId;
|
|
132
|
-
} & {
|
|
133
|
-
__v: number;
|
|
134
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Note, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Note>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Note> & {
|
|
135
|
-
_id: Types.ObjectId;
|
|
136
|
-
} & {
|
|
137
|
-
__v: number;
|
|
138
|
-
}>;
|
|
139
130
|
export declare class Attachment {
|
|
140
131
|
name: string;
|
|
141
132
|
url: string;
|
|
@@ -9,7 +9,7 @@ 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.PaymentModel = exports.PaymentSchema = exports.Payment = exports.AttachmentSchema = exports.Attachment = exports.
|
|
12
|
+
exports.PaymentModel = exports.PaymentSchema = exports.Payment = exports.AttachmentSchema = exports.Attachment = exports.CanceledSchema = exports.Canceled = exports.PaidSchema = exports.Paid = exports.QueuedSchema = exports.Queued = exports.RequestedSchema = exports.Requested = exports.PendingSchema = exports.Pending = exports.ReviewSchema = exports.Review = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
15
|
let Requester = class Requester {
|
|
@@ -213,7 +213,6 @@ __decorate([
|
|
|
213
213
|
Note = __decorate([
|
|
214
214
|
(0, mongoose_1.Schema)({ _id: false })
|
|
215
215
|
], Note);
|
|
216
|
-
exports.NoteSchema = mongoose_1.SchemaFactory.createForClass(Note);
|
|
217
216
|
let Attachment = class Attachment {
|
|
218
217
|
};
|
|
219
218
|
__decorate([
|
|
@@ -134,11 +134,6 @@ export declare const ExclusivitySchema: MongooseSchema<Exclusivity, import("mong
|
|
|
134
134
|
} & {
|
|
135
135
|
__v: number;
|
|
136
136
|
}>;
|
|
137
|
-
declare class Note {
|
|
138
|
-
text: string;
|
|
139
|
-
owner: string;
|
|
140
|
-
createdAt: Date;
|
|
141
|
-
}
|
|
142
137
|
export declare class Scope {
|
|
143
138
|
delivery: Delivery;
|
|
144
139
|
rights?: Rights;
|
|
@@ -147,7 +142,6 @@ export declare class Scope {
|
|
|
147
142
|
collab?: Collab;
|
|
148
143
|
exchange?: Exchange;
|
|
149
144
|
exclusivity?: Exclusivity;
|
|
150
|
-
notes?: Note[];
|
|
151
145
|
}
|
|
152
146
|
export declare const ScopeSchema: MongooseSchema<Scope, import("mongoose").Model<Scope, any, any, any, import("mongoose").Document<unknown, any, Scope, any, {}> & Scope & {
|
|
153
147
|
_id: Types.ObjectId;
|
|
@@ -179,23 +179,6 @@ Exclusivity = __decorate([
|
|
|
179
179
|
], Exclusivity);
|
|
180
180
|
exports.Exclusivity = Exclusivity;
|
|
181
181
|
exports.ExclusivitySchema = mongoose_1.SchemaFactory.createForClass(Exclusivity);
|
|
182
|
-
let Note = class Note {
|
|
183
|
-
};
|
|
184
|
-
__decorate([
|
|
185
|
-
(0, mongoose_1.Prop)(),
|
|
186
|
-
__metadata("design:type", String)
|
|
187
|
-
], Note.prototype, "text", void 0);
|
|
188
|
-
__decorate([
|
|
189
|
-
(0, mongoose_1.Prop)(),
|
|
190
|
-
__metadata("design:type", String)
|
|
191
|
-
], Note.prototype, "owner", void 0);
|
|
192
|
-
__decorate([
|
|
193
|
-
(0, mongoose_1.Prop)(),
|
|
194
|
-
__metadata("design:type", Date)
|
|
195
|
-
], Note.prototype, "createdAt", void 0);
|
|
196
|
-
Note = __decorate([
|
|
197
|
-
(0, mongoose_1.Schema)({ _id: false })
|
|
198
|
-
], Note);
|
|
199
182
|
let Scope = class Scope {
|
|
200
183
|
};
|
|
201
184
|
__decorate([
|
|
@@ -226,10 +209,6 @@ __decorate([
|
|
|
226
209
|
(0, mongoose_1.Prop)({ type: exports.ExclusivitySchema, required: false }),
|
|
227
210
|
__metadata("design:type", Exclusivity)
|
|
228
211
|
], Scope.prototype, "exclusivity", void 0);
|
|
229
|
-
__decorate([
|
|
230
|
-
(0, mongoose_1.Prop)([{ type: Note, required: false }]),
|
|
231
|
-
__metadata("design:type", Array)
|
|
232
|
-
], Scope.prototype, "notes", void 0);
|
|
233
212
|
Scope = __decorate([
|
|
234
213
|
(0, mongoose_1.Schema)({ _id: false })
|
|
235
214
|
], Scope);
|
|
@@ -56,7 +56,7 @@ __decorate([
|
|
|
56
56
|
(0, mongoose_1.Prop)({
|
|
57
57
|
type: String,
|
|
58
58
|
enum: ['inbound', 'outbound'],
|
|
59
|
-
required: true
|
|
59
|
+
required: true,
|
|
60
60
|
}),
|
|
61
61
|
__metadata("design:type", String)
|
|
62
62
|
], Proposal.prototype, "origin", void 0);
|
|
@@ -64,7 +64,7 @@ __decorate([
|
|
|
64
64
|
(0, mongoose_1.Prop)({
|
|
65
65
|
type: mongoose_2.Schema.Types.ObjectId,
|
|
66
66
|
ref: 'Profile',
|
|
67
|
-
required: false
|
|
67
|
+
required: false,
|
|
68
68
|
}),
|
|
69
69
|
__metadata("design:type", Object)
|
|
70
70
|
], Proposal.prototype, "profile", void 0);
|
|
@@ -75,8 +75,8 @@ __decorate([
|
|
|
75
75
|
type: {
|
|
76
76
|
team: String,
|
|
77
77
|
name: String,
|
|
78
|
-
email: String
|
|
79
|
-
}
|
|
78
|
+
email: String,
|
|
79
|
+
},
|
|
80
80
|
}),
|
|
81
81
|
__metadata("design:type", Object)
|
|
82
82
|
], Proposal.prototype, "responsable", void 0);
|
|
@@ -345,8 +345,8 @@ __decorate([
|
|
|
345
345
|
'commission',
|
|
346
346
|
'formalization',
|
|
347
347
|
'closed',
|
|
348
|
-
'lost'
|
|
349
|
-
]
|
|
348
|
+
'lost',
|
|
349
|
+
],
|
|
350
350
|
}),
|
|
351
351
|
__metadata("design:type", String)
|
|
352
352
|
], Sale.prototype, "phase", void 0);
|
|
@@ -403,8 +403,8 @@ __decorate([
|
|
|
403
403
|
{
|
|
404
404
|
type: mongoose_2.Schema.Types.ObjectId,
|
|
405
405
|
ref: 'Profile',
|
|
406
|
-
required: false
|
|
407
|
-
}
|
|
406
|
+
required: false,
|
|
407
|
+
},
|
|
408
408
|
]),
|
|
409
409
|
__metadata("design:type", Array)
|
|
410
410
|
], Sale.prototype, "profiles", void 0);
|
|
@@ -50,6 +50,7 @@ export declare class Company {
|
|
|
50
50
|
account: string;
|
|
51
51
|
digit: string;
|
|
52
52
|
pix: string;
|
|
53
|
+
email: string;
|
|
53
54
|
}
|
|
54
55
|
export declare const CompanySchema: MongooseSchema<Company, import("mongoose").Model<Company, any, any, any, import("mongoose").Document<unknown, any, Company, any, {}> & Company & {
|
|
55
56
|
_id: Types.ObjectId;
|
|
@@ -73,6 +73,10 @@ __decorate([
|
|
|
73
73
|
(0, mongoose_1.Prop)(),
|
|
74
74
|
__metadata("design:type", String)
|
|
75
75
|
], Company.prototype, "pix", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, mongoose_1.Prop)(),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], Company.prototype, "email", void 0);
|
|
76
80
|
Company = __decorate([
|
|
77
81
|
(0, mongoose_1.Schema)({ _id: false })
|
|
78
82
|
], Company);
|
package/package.json
CHANGED
|
@@ -45,6 +45,15 @@ export class Responsibles {
|
|
|
45
45
|
|
|
46
46
|
export const ResponsiblesSchema = SchemaFactory.createForClass(Responsibles);
|
|
47
47
|
|
|
48
|
+
@Schema({ _id: false })
|
|
49
|
+
class Note {
|
|
50
|
+
@Prop({ required: true }) text: string;
|
|
51
|
+
@Prop({ required: true }) owner: string;
|
|
52
|
+
@Prop({ required: true }) createdAt: Date;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const NoteSchema = SchemaFactory.createForClass(Note);
|
|
56
|
+
|
|
48
57
|
@Schema({ timestamps: true })
|
|
49
58
|
export class Action {
|
|
50
59
|
@ApiProperty({ example: '64bfc3a78d3f1e2a12345678' })
|
|
@@ -174,6 +183,10 @@ export class Action {
|
|
|
174
183
|
@ApiProperty({ example: '2025-08-29T15:00:00.000Z' })
|
|
175
184
|
@Prop({ type: Date, default: Date.now, required: false })
|
|
176
185
|
updatedAt?: Date;
|
|
186
|
+
|
|
187
|
+
@ApiProperty({ type: () => [Note], required: false })
|
|
188
|
+
@Prop({ type: [NoteSchema], required: false })
|
|
189
|
+
notes?: Note[];
|
|
177
190
|
}
|
|
178
191
|
|
|
179
192
|
export const ActionSchema = SchemaFactory.createForClass(Action);
|
|
@@ -4,13 +4,6 @@ import { Client } from './client.schema';
|
|
|
4
4
|
|
|
5
5
|
export type CampaignDocument = HydratedDocument<Campaign>;
|
|
6
6
|
|
|
7
|
-
@Schema({ _id: false })
|
|
8
|
-
class Note {
|
|
9
|
-
@Prop({ required: true }) text: string;
|
|
10
|
-
@Prop({ required: true }) owner: string;
|
|
11
|
-
@Prop({ required: true }) createdAt: Date;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
7
|
@Schema({ timestamps: true })
|
|
15
8
|
export class Campaign {
|
|
16
9
|
@Prop({ type: MongooseSchema.Types.ObjectId, auto: true, required: false })
|
|
@@ -22,9 +15,6 @@ export class Campaign {
|
|
|
22
15
|
@Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Client' })
|
|
23
16
|
client: Types.ObjectId | Client;
|
|
24
17
|
|
|
25
|
-
@Prop([{ type: Note, required: false }])
|
|
26
|
-
notes?: Note[];
|
|
27
|
-
|
|
28
18
|
@Prop({ default: Date.now, required: false })
|
|
29
19
|
createdAt?: Date;
|
|
30
20
|
|
|
@@ -80,6 +80,9 @@ export class Commission {
|
|
|
80
80
|
|
|
81
81
|
@Prop({ type: Date, default: Date.now, required: false })
|
|
82
82
|
updatedAt?: Date;
|
|
83
|
+
|
|
84
|
+
@Prop({ type: MongooseSchema.Types.ObjectId, required: false })
|
|
85
|
+
organization?: Types.ObjectId;
|
|
83
86
|
}
|
|
84
87
|
|
|
85
88
|
export const CommissionSchema = SchemaFactory.createForClass(Commission);
|
|
@@ -21,6 +21,18 @@ export class Advisor {
|
|
|
21
21
|
|
|
22
22
|
export const AdvisorSchema = SchemaFactory.createForClass(Advisor);
|
|
23
23
|
|
|
24
|
+
@Schema({ _id: false })
|
|
25
|
+
export class Note {
|
|
26
|
+
@Prop() text: string;
|
|
27
|
+
|
|
28
|
+
@Prop() owner: string;
|
|
29
|
+
|
|
30
|
+
@Prop({ type: Date, default: Date.now })
|
|
31
|
+
createdAt: Date;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export const NoteSchema = SchemaFactory.createForClass(Note);
|
|
35
|
+
|
|
24
36
|
@Schema({ timestamps: true })
|
|
25
37
|
export class Influencer extends User {
|
|
26
38
|
@Prop({ required: false })
|
|
@@ -36,6 +48,9 @@ export class Influencer extends User {
|
|
|
36
48
|
{ type: MongooseSchema.Types.ObjectId, ref: 'Profile', required: false },
|
|
37
49
|
])
|
|
38
50
|
profiles?: Types.ObjectId[] | Profile[];
|
|
51
|
+
|
|
52
|
+
@Prop({ type: [NoteSchema], required: false })
|
|
53
|
+
notes?: Note[];
|
|
39
54
|
}
|
|
40
55
|
|
|
41
56
|
export const InfluencerSchema = SchemaFactory.createForClass(Influencer);
|
|
@@ -129,15 +129,6 @@ export class Exclusivity {
|
|
|
129
129
|
|
|
130
130
|
export const ExclusivitySchema = SchemaFactory.createForClass(Exclusivity);
|
|
131
131
|
|
|
132
|
-
@Schema({ _id: false })
|
|
133
|
-
class Note {
|
|
134
|
-
@Prop() text: string;
|
|
135
|
-
|
|
136
|
-
@Prop() owner: string;
|
|
137
|
-
|
|
138
|
-
@Prop() createdAt: Date;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
132
|
@Schema({ _id: false })
|
|
142
133
|
export class Scope {
|
|
143
134
|
@Prop({ type: DeliverySchema })
|
|
@@ -161,8 +152,6 @@ export class Scope {
|
|
|
161
152
|
@Prop({ type: ExclusivitySchema, required: false })
|
|
162
153
|
exclusivity?: Exclusivity;
|
|
163
154
|
|
|
164
|
-
@Prop([{ type: Note, required: false }])
|
|
165
|
-
notes?: Note[];
|
|
166
155
|
}
|
|
167
156
|
|
|
168
157
|
export const ScopeSchema = SchemaFactory.createForClass(Scope);
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
HydratedDocument,
|
|
4
4
|
Schema as MongooseSchema,
|
|
5
5
|
Types,
|
|
6
|
-
model as MongooseModel
|
|
6
|
+
model as MongooseModel,
|
|
7
7
|
} from 'mongoose';
|
|
8
8
|
import { Profile } from './profile.schema';
|
|
9
9
|
import { Client } from './client.schema';
|
|
@@ -28,14 +28,14 @@ export class Proposal {
|
|
|
28
28
|
@Prop({
|
|
29
29
|
type: String,
|
|
30
30
|
enum: ['inbound', 'outbound'],
|
|
31
|
-
required: true
|
|
31
|
+
required: true,
|
|
32
32
|
})
|
|
33
33
|
origin: 'inbound' | 'outbound';
|
|
34
34
|
|
|
35
35
|
@Prop({
|
|
36
36
|
type: MongooseSchema.Types.ObjectId,
|
|
37
37
|
ref: 'Profile',
|
|
38
|
-
required: false
|
|
38
|
+
required: false,
|
|
39
39
|
})
|
|
40
40
|
profile?: Types.ObjectId | Profile;
|
|
41
41
|
|
|
@@ -45,8 +45,8 @@ export class Proposal {
|
|
|
45
45
|
type: {
|
|
46
46
|
team: String,
|
|
47
47
|
name: String,
|
|
48
|
-
email: String
|
|
49
|
-
}
|
|
48
|
+
email: String,
|
|
49
|
+
},
|
|
50
50
|
})
|
|
51
51
|
responsable: {
|
|
52
52
|
team: string;
|
|
@@ -170,8 +170,8 @@ export class Sale {
|
|
|
170
170
|
'commission',
|
|
171
171
|
'formalization',
|
|
172
172
|
'closed',
|
|
173
|
-
'lost'
|
|
174
|
-
]
|
|
173
|
+
'lost',
|
|
174
|
+
],
|
|
175
175
|
})
|
|
176
176
|
phase:
|
|
177
177
|
| 'screening'
|
|
@@ -182,7 +182,7 @@ export class Sale {
|
|
|
182
182
|
| 'closed'
|
|
183
183
|
| 'lost';
|
|
184
184
|
|
|
185
|
-
|
|
185
|
+
@Prop({
|
|
186
186
|
type: String,
|
|
187
187
|
enum: ['new', 'renewal', 'upsell'],
|
|
188
188
|
default: 'new',
|
|
@@ -201,7 +201,7 @@ export class Sale {
|
|
|
201
201
|
notes?: Note[];
|
|
202
202
|
|
|
203
203
|
@Prop({ type: MongooseSchema.Types.ObjectId })
|
|
204
|
-
organization: Types.ObjectId
|
|
204
|
+
organization: Types.ObjectId;
|
|
205
205
|
|
|
206
206
|
@Prop({ type: [String], required: false, default: [] })
|
|
207
207
|
tags?: string[];
|
|
@@ -213,8 +213,8 @@ export class Sale {
|
|
|
213
213
|
{
|
|
214
214
|
type: MongooseSchema.Types.ObjectId,
|
|
215
215
|
ref: 'Profile',
|
|
216
|
-
required: false
|
|
217
|
-
}
|
|
216
|
+
required: false,
|
|
217
|
+
},
|
|
218
218
|
])
|
|
219
219
|
profiles?: Types.ObjectId[] | Profile[];
|
|
220
220
|
|