@grapadigital/shared-schemas 1.1.1 → 2.0.0
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.
|
@@ -13,6 +13,8 @@ export declare class Proposal {
|
|
|
13
13
|
origin: "inbound" | "outbound";
|
|
14
14
|
profile?: Types.ObjectId | Profile;
|
|
15
15
|
influencer?: Types.ObjectId | Influencer;
|
|
16
|
+
brand?: Types.ObjectId | Client;
|
|
17
|
+
agency?: Types.ObjectId | Client;
|
|
16
18
|
}
|
|
17
19
|
export declare class Negotiation {
|
|
18
20
|
calculatorType: "withPreDefinedBudget" | "withoutPreDefinedBudget" | "byCommission" | "bourbon";
|
|
@@ -47,8 +49,6 @@ export declare class Formalization {
|
|
|
47
49
|
paymentTerms: string;
|
|
48
50
|
handlingInvoices: string;
|
|
49
51
|
finalScope: string;
|
|
50
|
-
brand: Types.ObjectId | Client;
|
|
51
|
-
agency?: Types.ObjectId | Client;
|
|
52
52
|
totalInstallments: number;
|
|
53
53
|
}
|
|
54
54
|
export declare class Lost {
|
|
@@ -54,6 +54,14 @@ __decorate([
|
|
|
54
54
|
}),
|
|
55
55
|
__metadata("design:type", Object)
|
|
56
56
|
], Proposal.prototype, "influencer", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: "Client", required: false }),
|
|
59
|
+
__metadata("design:type", Object)
|
|
60
|
+
], Proposal.prototype, "brand", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: "Client", required: false }),
|
|
63
|
+
__metadata("design:type", Object)
|
|
64
|
+
], Proposal.prototype, "agency", void 0);
|
|
57
65
|
exports.Proposal = Proposal = __decorate([
|
|
58
66
|
(0, mongoose_1.Schema)({ _id: false })
|
|
59
67
|
], Proposal);
|
|
@@ -186,14 +194,6 @@ __decorate([
|
|
|
186
194
|
(0, mongoose_1.Prop)({ required: true }),
|
|
187
195
|
__metadata("design:type", String)
|
|
188
196
|
], Formalization.prototype, "finalScope", void 0);
|
|
189
|
-
__decorate([
|
|
190
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: "Client" }),
|
|
191
|
-
__metadata("design:type", Object)
|
|
192
|
-
], Formalization.prototype, "brand", void 0);
|
|
193
|
-
__decorate([
|
|
194
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: "Client", required: false }),
|
|
195
|
-
__metadata("design:type", Object)
|
|
196
|
-
], Formalization.prototype, "agency", void 0);
|
|
197
197
|
__decorate([
|
|
198
198
|
(0, mongoose_1.Prop)({ type: Number, required: true }),
|
|
199
199
|
__metadata("design:type", Number)
|
|
@@ -509,8 +509,8 @@ exports.Sale = Sale = __decorate([
|
|
|
509
509
|
exports.SaleSchema = mongoose_1.SchemaFactory.createForClass(Sale);
|
|
510
510
|
exports.SaleSchema.index({ organization: 1, phase: 1 });
|
|
511
511
|
exports.SaleSchema.index({ organization: 1, createdAt: -1 });
|
|
512
|
-
exports.SaleSchema.index({ organization: 1, "
|
|
513
|
-
exports.SaleSchema.index({ organization: 1, "
|
|
512
|
+
exports.SaleSchema.index({ organization: 1, "proposal.brand": 1 });
|
|
513
|
+
exports.SaleSchema.index({ organization: 1, "proposal.agency": 1 });
|
|
514
514
|
exports.SaleSchema.index({ organization: 1, closedAt: 1, phase: 1 });
|
|
515
515
|
exports.SaleSchema.index({ "proposal.influencer": 1 });
|
|
516
516
|
exports.SaleSchema.index({ "responsible.proposal.email": 1 });
|