@grapadigital/shared-schemas 1.0.104 → 1.0.106
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.
|
@@ -26,16 +26,15 @@
|
|
|
26
26
|
import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
|
|
27
27
|
import { Action } from './action.schema';
|
|
28
28
|
import { Profile } from './profile.schema';
|
|
29
|
-
import { Content } from './content.schema';
|
|
30
29
|
export type RecruitmentDocument = HydratedDocument<Recruitment>;
|
|
31
30
|
export declare class Delivery {
|
|
32
|
-
reels
|
|
33
|
-
images
|
|
34
|
-
carousels
|
|
35
|
-
stories
|
|
36
|
-
tiktok
|
|
37
|
-
youtube
|
|
38
|
-
dayAllocation
|
|
31
|
+
reels?: number;
|
|
32
|
+
images?: number;
|
|
33
|
+
carousels?: number;
|
|
34
|
+
stories?: number;
|
|
35
|
+
tiktok?: number;
|
|
36
|
+
youtube?: number;
|
|
37
|
+
dayAllocation?: number;
|
|
39
38
|
}
|
|
40
39
|
export declare const DeliverySchema: MongooseSchema<Delivery, import("mongoose").Model<Delivery, any, any, any, import("mongoose").Document<unknown, any, Delivery, any, {}> & Delivery & {
|
|
41
40
|
_id: Types.ObjectId;
|
|
@@ -86,40 +85,13 @@ export declare const InstallmentInfoSchema: MongooseSchema<InstallmentInfo, impo
|
|
|
86
85
|
} & {
|
|
87
86
|
__v: number;
|
|
88
87
|
}>;
|
|
89
|
-
|
|
88
|
+
declare class Payment {
|
|
90
89
|
hasPayment: boolean;
|
|
91
90
|
hasInstallment: boolean;
|
|
92
91
|
value: number;
|
|
93
92
|
installmentInfo: InstallmentInfo[];
|
|
94
93
|
deadline: number;
|
|
95
|
-
passThrough: boolean;
|
|
96
94
|
}
|
|
97
|
-
export declare const InfluencerPaymentSchema: MongooseSchema<InfluencerPayment, import("mongoose").Model<InfluencerPayment, any, any, any, import("mongoose").Document<unknown, any, InfluencerPayment, any, {}> & InfluencerPayment & {
|
|
98
|
-
_id: Types.ObjectId;
|
|
99
|
-
} & {
|
|
100
|
-
__v: number;
|
|
101
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, InfluencerPayment, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<InfluencerPayment>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<InfluencerPayment> & {
|
|
102
|
-
_id: Types.ObjectId;
|
|
103
|
-
} & {
|
|
104
|
-
__v: number;
|
|
105
|
-
}>;
|
|
106
|
-
export declare class AdvisorPayment {
|
|
107
|
-
hasPayment: boolean;
|
|
108
|
-
hasInstallment: boolean;
|
|
109
|
-
value: number;
|
|
110
|
-
installmentInfo: InstallmentInfo[];
|
|
111
|
-
deadline: number;
|
|
112
|
-
passThrough: boolean;
|
|
113
|
-
}
|
|
114
|
-
export declare const AdvisorPaymentSchema: MongooseSchema<AdvisorPayment, import("mongoose").Model<AdvisorPayment, any, any, any, import("mongoose").Document<unknown, any, AdvisorPayment, any, {}> & AdvisorPayment & {
|
|
115
|
-
_id: Types.ObjectId;
|
|
116
|
-
} & {
|
|
117
|
-
__v: number;
|
|
118
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, AdvisorPayment, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<AdvisorPayment>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<AdvisorPayment> & {
|
|
119
|
-
_id: Types.ObjectId;
|
|
120
|
-
} & {
|
|
121
|
-
__v: number;
|
|
122
|
-
}>;
|
|
123
95
|
export declare class Exchange {
|
|
124
96
|
hasExchange: boolean;
|
|
125
97
|
valueInProduct: number;
|
|
@@ -146,19 +118,28 @@ export declare const CollabSchema: MongooseSchema<Collab, import("mongoose").Mod
|
|
|
146
118
|
} & {
|
|
147
119
|
__v: number;
|
|
148
120
|
}>;
|
|
121
|
+
export declare class Exclusivity {
|
|
122
|
+
startDate: Date;
|
|
123
|
+
endDate: Date;
|
|
124
|
+
categoty: string;
|
|
125
|
+
}
|
|
126
|
+
export declare const ExclusivitySchema: MongooseSchema<Exclusivity, import("mongoose").Model<Exclusivity, any, any, any, import("mongoose").Document<unknown, any, Exclusivity, any, {}> & Exclusivity & {
|
|
127
|
+
_id: Types.ObjectId;
|
|
128
|
+
} & {
|
|
129
|
+
__v: number;
|
|
130
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Exclusivity, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Exclusivity>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Exclusivity> & {
|
|
131
|
+
_id: Types.ObjectId;
|
|
132
|
+
} & {
|
|
133
|
+
__v: number;
|
|
134
|
+
}>;
|
|
149
135
|
export declare class Scope {
|
|
150
136
|
delivery: Delivery;
|
|
151
|
-
rights
|
|
152
|
-
payment
|
|
153
|
-
advisorPayment
|
|
154
|
-
collab
|
|
155
|
-
exchange
|
|
156
|
-
|
|
157
|
-
totalAcceptanceTermSent: number;
|
|
158
|
-
paymentMethod: string;
|
|
159
|
-
exclusivity: boolean;
|
|
160
|
-
passThrough: boolean;
|
|
161
|
-
childPermit: boolean;
|
|
137
|
+
rights?: Rights;
|
|
138
|
+
payment?: Payment;
|
|
139
|
+
advisorPayment?: Payment;
|
|
140
|
+
collab?: Collab;
|
|
141
|
+
exchange?: Exchange;
|
|
142
|
+
exclusivity?: Exclusivity;
|
|
162
143
|
}
|
|
163
144
|
export declare const ScopeSchema: MongooseSchema<Scope, import("mongoose").Model<Scope, any, any, any, import("mongoose").Document<unknown, any, Scope, any, {}> & Scope & {
|
|
164
145
|
_id: Types.ObjectId;
|
|
@@ -176,13 +157,7 @@ export declare class Recruitment {
|
|
|
176
157
|
status: 'selected' | 'inContact' | 'inApproval' | 'recruited' | 'removed';
|
|
177
158
|
action: Types.ObjectId | Action;
|
|
178
159
|
profile: Types.ObjectId | Profile;
|
|
179
|
-
|
|
180
|
-
image: Types.ObjectId[] | Content[];
|
|
181
|
-
carousel: Types.ObjectId[] | Content[];
|
|
182
|
-
story: Types.ObjectId[] | Content[];
|
|
183
|
-
tiktok: Types.ObjectId[] | Content[];
|
|
184
|
-
youtube: Types.ObjectId[] | Content[];
|
|
185
|
-
scope: Scope;
|
|
160
|
+
scope?: Scope;
|
|
186
161
|
createdAt?: Date;
|
|
187
162
|
updatedAt?: Date;
|
|
188
163
|
}
|
|
@@ -208,3 +183,4 @@ export declare const RecruitmentModel: import("mongoose").Model<Recruitment, {},
|
|
|
208
183
|
}> & {
|
|
209
184
|
__v: number;
|
|
210
185
|
}>>;
|
|
186
|
+
export {};
|
|
@@ -9,37 +9,37 @@ 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.RecruitmentModel = exports.RecruitmentSchema = exports.Recruitment = exports.ScopeSchema = exports.Scope = exports.
|
|
12
|
+
exports.RecruitmentModel = exports.RecruitmentSchema = exports.Recruitment = exports.ScopeSchema = exports.Scope = exports.ExclusivitySchema = exports.Exclusivity = exports.CollabSchema = exports.Collab = exports.ExchangeSchema = exports.Exchange = exports.InstallmentInfoSchema = exports.InstallmentInfo = exports.RightsSchema = exports.Rights = exports.RightSchema = exports.Right = exports.DeliverySchema = exports.Delivery = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
15
|
let Delivery = class Delivery {
|
|
16
16
|
};
|
|
17
17
|
__decorate([
|
|
18
|
-
(0, mongoose_1.Prop)(),
|
|
18
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
19
19
|
__metadata("design:type", Number)
|
|
20
20
|
], Delivery.prototype, "reels", void 0);
|
|
21
21
|
__decorate([
|
|
22
|
-
(0, mongoose_1.Prop)(),
|
|
22
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
23
23
|
__metadata("design:type", Number)
|
|
24
24
|
], Delivery.prototype, "images", void 0);
|
|
25
25
|
__decorate([
|
|
26
|
-
(0, mongoose_1.Prop)(),
|
|
26
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
27
27
|
__metadata("design:type", Number)
|
|
28
28
|
], Delivery.prototype, "carousels", void 0);
|
|
29
29
|
__decorate([
|
|
30
|
-
(0, mongoose_1.Prop)(),
|
|
30
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
31
31
|
__metadata("design:type", Number)
|
|
32
32
|
], Delivery.prototype, "stories", void 0);
|
|
33
33
|
__decorate([
|
|
34
|
-
(0, mongoose_1.Prop)(),
|
|
34
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
35
35
|
__metadata("design:type", Number)
|
|
36
36
|
], Delivery.prototype, "tiktok", void 0);
|
|
37
37
|
__decorate([
|
|
38
|
-
(0, mongoose_1.Prop)(),
|
|
38
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
39
39
|
__metadata("design:type", Number)
|
|
40
40
|
], Delivery.prototype, "youtube", void 0);
|
|
41
41
|
__decorate([
|
|
42
|
-
(0, mongoose_1.Prop)(),
|
|
42
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
43
43
|
__metadata("design:type", Number)
|
|
44
44
|
], Delivery.prototype, "dayAllocation", void 0);
|
|
45
45
|
Delivery = __decorate([
|
|
@@ -96,68 +96,32 @@ InstallmentInfo = __decorate([
|
|
|
96
96
|
], InstallmentInfo);
|
|
97
97
|
exports.InstallmentInfo = InstallmentInfo;
|
|
98
98
|
exports.InstallmentInfoSchema = mongoose_1.SchemaFactory.createForClass(InstallmentInfo);
|
|
99
|
-
let
|
|
99
|
+
let Payment = class Payment {
|
|
100
100
|
};
|
|
101
101
|
__decorate([
|
|
102
102
|
(0, mongoose_1.Prop)(),
|
|
103
103
|
__metadata("design:type", Boolean)
|
|
104
|
-
],
|
|
104
|
+
], Payment.prototype, "hasPayment", void 0);
|
|
105
105
|
__decorate([
|
|
106
106
|
(0, mongoose_1.Prop)(),
|
|
107
107
|
__metadata("design:type", Boolean)
|
|
108
|
-
],
|
|
108
|
+
], Payment.prototype, "hasInstallment", void 0);
|
|
109
109
|
__decorate([
|
|
110
110
|
(0, mongoose_1.Prop)(),
|
|
111
111
|
__metadata("design:type", Number)
|
|
112
|
-
],
|
|
112
|
+
], Payment.prototype, "value", void 0);
|
|
113
113
|
__decorate([
|
|
114
114
|
(0, mongoose_1.Prop)([{ type: exports.InstallmentInfoSchema }]),
|
|
115
115
|
__metadata("design:type", Array)
|
|
116
|
-
],
|
|
116
|
+
], Payment.prototype, "installmentInfo", void 0);
|
|
117
117
|
__decorate([
|
|
118
118
|
(0, mongoose_1.Prop)(),
|
|
119
119
|
__metadata("design:type", Number)
|
|
120
|
-
],
|
|
121
|
-
__decorate([
|
|
122
|
-
(0, mongoose_1.Prop)(),
|
|
123
|
-
__metadata("design:type", Boolean)
|
|
124
|
-
], InfluencerPayment.prototype, "passThrough", void 0);
|
|
125
|
-
InfluencerPayment = __decorate([
|
|
120
|
+
], Payment.prototype, "deadline", void 0);
|
|
121
|
+
Payment = __decorate([
|
|
126
122
|
(0, mongoose_1.Schema)({ _id: false })
|
|
127
|
-
],
|
|
128
|
-
|
|
129
|
-
exports.InfluencerPaymentSchema = mongoose_1.SchemaFactory.createForClass(InfluencerPayment);
|
|
130
|
-
let AdvisorPayment = class AdvisorPayment {
|
|
131
|
-
};
|
|
132
|
-
__decorate([
|
|
133
|
-
(0, mongoose_1.Prop)(),
|
|
134
|
-
__metadata("design:type", Boolean)
|
|
135
|
-
], AdvisorPayment.prototype, "hasPayment", void 0);
|
|
136
|
-
__decorate([
|
|
137
|
-
(0, mongoose_1.Prop)(),
|
|
138
|
-
__metadata("design:type", Boolean)
|
|
139
|
-
], AdvisorPayment.prototype, "hasInstallment", void 0);
|
|
140
|
-
__decorate([
|
|
141
|
-
(0, mongoose_1.Prop)(),
|
|
142
|
-
__metadata("design:type", Number)
|
|
143
|
-
], AdvisorPayment.prototype, "value", void 0);
|
|
144
|
-
__decorate([
|
|
145
|
-
(0, mongoose_1.Prop)([{ type: exports.InstallmentInfoSchema }]),
|
|
146
|
-
__metadata("design:type", Array)
|
|
147
|
-
], AdvisorPayment.prototype, "installmentInfo", void 0);
|
|
148
|
-
__decorate([
|
|
149
|
-
(0, mongoose_1.Prop)(),
|
|
150
|
-
__metadata("design:type", Number)
|
|
151
|
-
], AdvisorPayment.prototype, "deadline", void 0);
|
|
152
|
-
__decorate([
|
|
153
|
-
(0, mongoose_1.Prop)(),
|
|
154
|
-
__metadata("design:type", Boolean)
|
|
155
|
-
], AdvisorPayment.prototype, "passThrough", void 0);
|
|
156
|
-
AdvisorPayment = __decorate([
|
|
157
|
-
(0, mongoose_1.Schema)({ _id: false })
|
|
158
|
-
], AdvisorPayment);
|
|
159
|
-
exports.AdvisorPayment = AdvisorPayment;
|
|
160
|
-
exports.AdvisorPaymentSchema = mongoose_1.SchemaFactory.createForClass(AdvisorPayment);
|
|
123
|
+
], Payment);
|
|
124
|
+
const PaymentSchema = mongoose_1.SchemaFactory.createForClass(Payment);
|
|
161
125
|
let Exchange = class Exchange {
|
|
162
126
|
};
|
|
163
127
|
__decorate([
|
|
@@ -188,6 +152,25 @@ Collab = __decorate([
|
|
|
188
152
|
], Collab);
|
|
189
153
|
exports.Collab = Collab;
|
|
190
154
|
exports.CollabSchema = mongoose_1.SchemaFactory.createForClass(Collab);
|
|
155
|
+
let Exclusivity = class Exclusivity {
|
|
156
|
+
};
|
|
157
|
+
__decorate([
|
|
158
|
+
(0, mongoose_1.Prop)(),
|
|
159
|
+
__metadata("design:type", Date)
|
|
160
|
+
], Exclusivity.prototype, "startDate", void 0);
|
|
161
|
+
__decorate([
|
|
162
|
+
(0, mongoose_1.Prop)(),
|
|
163
|
+
__metadata("design:type", Date)
|
|
164
|
+
], Exclusivity.prototype, "endDate", void 0);
|
|
165
|
+
__decorate([
|
|
166
|
+
(0, mongoose_1.Prop)(),
|
|
167
|
+
__metadata("design:type", String)
|
|
168
|
+
], Exclusivity.prototype, "categoty", void 0);
|
|
169
|
+
Exclusivity = __decorate([
|
|
170
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
171
|
+
], Exclusivity);
|
|
172
|
+
exports.Exclusivity = Exclusivity;
|
|
173
|
+
exports.ExclusivitySchema = mongoose_1.SchemaFactory.createForClass(Exclusivity);
|
|
191
174
|
let Scope = class Scope {
|
|
192
175
|
};
|
|
193
176
|
__decorate([
|
|
@@ -195,49 +178,29 @@ __decorate([
|
|
|
195
178
|
__metadata("design:type", Delivery)
|
|
196
179
|
], Scope.prototype, "delivery", void 0);
|
|
197
180
|
__decorate([
|
|
198
|
-
(0, mongoose_1.Prop)({ type: exports.RightsSchema }),
|
|
181
|
+
(0, mongoose_1.Prop)({ type: exports.RightsSchema, required: false }),
|
|
199
182
|
__metadata("design:type", Rights)
|
|
200
183
|
], Scope.prototype, "rights", void 0);
|
|
201
184
|
__decorate([
|
|
202
|
-
(0, mongoose_1.Prop)({ type:
|
|
203
|
-
__metadata("design:type",
|
|
185
|
+
(0, mongoose_1.Prop)({ type: PaymentSchema, required: false }),
|
|
186
|
+
__metadata("design:type", Payment)
|
|
204
187
|
], Scope.prototype, "payment", void 0);
|
|
205
188
|
__decorate([
|
|
206
|
-
(0, mongoose_1.Prop)({ type:
|
|
207
|
-
__metadata("design:type",
|
|
189
|
+
(0, mongoose_1.Prop)({ type: PaymentSchema, required: false }),
|
|
190
|
+
__metadata("design:type", Payment)
|
|
208
191
|
], Scope.prototype, "advisorPayment", void 0);
|
|
209
192
|
__decorate([
|
|
210
|
-
(0, mongoose_1.Prop)({ type: exports.CollabSchema }),
|
|
193
|
+
(0, mongoose_1.Prop)({ type: exports.CollabSchema, required: false }),
|
|
211
194
|
__metadata("design:type", Collab)
|
|
212
195
|
], Scope.prototype, "collab", void 0);
|
|
213
196
|
__decorate([
|
|
214
|
-
(0, mongoose_1.Prop)({ type: exports.ExchangeSchema }),
|
|
197
|
+
(0, mongoose_1.Prop)({ type: exports.ExchangeSchema, required: false }),
|
|
215
198
|
__metadata("design:type", Exchange)
|
|
216
199
|
], Scope.prototype, "exchange", void 0);
|
|
217
200
|
__decorate([
|
|
218
|
-
(0, mongoose_1.Prop)(),
|
|
219
|
-
__metadata("design:type",
|
|
220
|
-
], Scope.prototype, "sendAcceptanceTerm", void 0);
|
|
221
|
-
__decorate([
|
|
222
|
-
(0, mongoose_1.Prop)(),
|
|
223
|
-
__metadata("design:type", Number)
|
|
224
|
-
], Scope.prototype, "totalAcceptanceTermSent", void 0);
|
|
225
|
-
__decorate([
|
|
226
|
-
(0, mongoose_1.Prop)(),
|
|
227
|
-
__metadata("design:type", String)
|
|
228
|
-
], Scope.prototype, "paymentMethod", void 0);
|
|
229
|
-
__decorate([
|
|
230
|
-
(0, mongoose_1.Prop)(),
|
|
231
|
-
__metadata("design:type", Boolean)
|
|
201
|
+
(0, mongoose_1.Prop)({ type: exports.ExclusivitySchema, required: false }),
|
|
202
|
+
__metadata("design:type", Exclusivity)
|
|
232
203
|
], Scope.prototype, "exclusivity", void 0);
|
|
233
|
-
__decorate([
|
|
234
|
-
(0, mongoose_1.Prop)(),
|
|
235
|
-
__metadata("design:type", Boolean)
|
|
236
|
-
], Scope.prototype, "passThrough", void 0);
|
|
237
|
-
__decorate([
|
|
238
|
-
(0, mongoose_1.Prop)(),
|
|
239
|
-
__metadata("design:type", Boolean)
|
|
240
|
-
], Scope.prototype, "childPermit", void 0);
|
|
241
204
|
Scope = __decorate([
|
|
242
205
|
(0, mongoose_1.Schema)({ _id: false })
|
|
243
206
|
], Scope);
|
|
@@ -273,30 +236,6 @@ __decorate([
|
|
|
273
236
|
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Profile' }),
|
|
274
237
|
__metadata("design:type", Object)
|
|
275
238
|
], Recruitment.prototype, "profile", void 0);
|
|
276
|
-
__decorate([
|
|
277
|
-
(0, mongoose_1.Prop)([{ type: mongoose_2.Schema.Types.ObjectId, ref: 'Content' }]),
|
|
278
|
-
__metadata("design:type", Array)
|
|
279
|
-
], Recruitment.prototype, "reel", void 0);
|
|
280
|
-
__decorate([
|
|
281
|
-
(0, mongoose_1.Prop)([{ type: mongoose_2.Schema.Types.ObjectId, ref: 'Content' }]),
|
|
282
|
-
__metadata("design:type", Array)
|
|
283
|
-
], Recruitment.prototype, "image", void 0);
|
|
284
|
-
__decorate([
|
|
285
|
-
(0, mongoose_1.Prop)([{ type: mongoose_2.Schema.Types.ObjectId, ref: 'Content' }]),
|
|
286
|
-
__metadata("design:type", Array)
|
|
287
|
-
], Recruitment.prototype, "carousel", void 0);
|
|
288
|
-
__decorate([
|
|
289
|
-
(0, mongoose_1.Prop)([{ type: mongoose_2.Schema.Types.ObjectId, ref: 'Content' }]),
|
|
290
|
-
__metadata("design:type", Array)
|
|
291
|
-
], Recruitment.prototype, "story", void 0);
|
|
292
|
-
__decorate([
|
|
293
|
-
(0, mongoose_1.Prop)([{ type: mongoose_2.Schema.Types.ObjectId, ref: 'Content' }]),
|
|
294
|
-
__metadata("design:type", Array)
|
|
295
|
-
], Recruitment.prototype, "tiktok", void 0);
|
|
296
|
-
__decorate([
|
|
297
|
-
(0, mongoose_1.Prop)([{ type: mongoose_2.Schema.Types.ObjectId, ref: 'Content' }]),
|
|
298
|
-
__metadata("design:type", Array)
|
|
299
|
-
], Recruitment.prototype, "youtube", void 0);
|
|
300
239
|
__decorate([
|
|
301
240
|
(0, mongoose_1.Prop)({ type: exports.ScopeSchema }),
|
|
302
241
|
__metadata("design:type", Scope)
|
package/package.json
CHANGED
|
@@ -2,32 +2,31 @@ import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
|
|
2
2
|
import { HydratedDocument, Schema as MongooseSchema, Types, model as MongooseModel } from 'mongoose';
|
|
3
3
|
import { Action } from './action.schema';
|
|
4
4
|
import { Profile } from './profile.schema';
|
|
5
|
-
import { Content } from './content.schema';
|
|
6
5
|
|
|
7
6
|
export type RecruitmentDocument = HydratedDocument<Recruitment>;
|
|
8
7
|
|
|
9
8
|
@Schema({ _id: false })
|
|
10
9
|
export class Delivery {
|
|
11
|
-
@Prop()
|
|
12
|
-
reels
|
|
10
|
+
@Prop({ required: false })
|
|
11
|
+
reels?: number;
|
|
13
12
|
|
|
14
|
-
@Prop()
|
|
15
|
-
images
|
|
13
|
+
@Prop({ required: false })
|
|
14
|
+
images?: number;
|
|
16
15
|
|
|
17
|
-
@Prop()
|
|
18
|
-
carousels
|
|
16
|
+
@Prop({ required: false })
|
|
17
|
+
carousels?: number;
|
|
19
18
|
|
|
20
|
-
@Prop()
|
|
21
|
-
stories
|
|
19
|
+
@Prop({ required: false })
|
|
20
|
+
stories?: number;
|
|
22
21
|
|
|
23
|
-
@Prop()
|
|
24
|
-
tiktok
|
|
22
|
+
@Prop({ required: false })
|
|
23
|
+
tiktok?: number;
|
|
25
24
|
|
|
26
|
-
@Prop()
|
|
27
|
-
youtube
|
|
25
|
+
@Prop({ required: false })
|
|
26
|
+
youtube?: number;
|
|
28
27
|
|
|
29
|
-
@Prop()
|
|
30
|
-
dayAllocation
|
|
28
|
+
@Prop({ required: false })
|
|
29
|
+
dayAllocation?: number;
|
|
31
30
|
}
|
|
32
31
|
|
|
33
32
|
export const DeliverySchema = SchemaFactory.createForClass(Delivery);
|
|
@@ -69,7 +68,7 @@ export const InstallmentInfoSchema =
|
|
|
69
68
|
SchemaFactory.createForClass(InstallmentInfo);
|
|
70
69
|
|
|
71
70
|
@Schema({ _id: false })
|
|
72
|
-
|
|
71
|
+
class Payment {
|
|
73
72
|
@Prop()
|
|
74
73
|
hasPayment: boolean;
|
|
75
74
|
|
|
@@ -84,37 +83,9 @@ export class InfluencerPayment {
|
|
|
84
83
|
|
|
85
84
|
@Prop()
|
|
86
85
|
deadline: number;
|
|
87
|
-
|
|
88
|
-
@Prop()
|
|
89
|
-
passThrough: boolean;
|
|
90
86
|
}
|
|
91
87
|
|
|
92
|
-
|
|
93
|
-
SchemaFactory.createForClass(InfluencerPayment);
|
|
94
|
-
|
|
95
|
-
@Schema({ _id: false })
|
|
96
|
-
export class AdvisorPayment {
|
|
97
|
-
@Prop()
|
|
98
|
-
hasPayment: boolean;
|
|
99
|
-
|
|
100
|
-
@Prop()
|
|
101
|
-
hasInstallment: boolean;
|
|
102
|
-
|
|
103
|
-
@Prop()
|
|
104
|
-
value: number;
|
|
105
|
-
|
|
106
|
-
@Prop([{ type: InstallmentInfoSchema }])
|
|
107
|
-
installmentInfo: InstallmentInfo[];
|
|
108
|
-
|
|
109
|
-
@Prop()
|
|
110
|
-
deadline: number;
|
|
111
|
-
|
|
112
|
-
@Prop()
|
|
113
|
-
passThrough: boolean;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export const AdvisorPaymentSchema =
|
|
117
|
-
SchemaFactory.createForClass(AdvisorPayment);
|
|
88
|
+
const PaymentSchema = SchemaFactory.createForClass(Payment);
|
|
118
89
|
|
|
119
90
|
@Schema({ _id: false })
|
|
120
91
|
export class Exchange {
|
|
@@ -139,42 +110,41 @@ export class Collab {
|
|
|
139
110
|
export const CollabSchema = SchemaFactory.createForClass(Collab);
|
|
140
111
|
|
|
141
112
|
@Schema({ _id: false })
|
|
142
|
-
export class
|
|
143
|
-
@Prop(
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
@Prop({ type: RightsSchema })
|
|
147
|
-
rights: Rights;
|
|
113
|
+
export class Exclusivity {
|
|
114
|
+
@Prop()
|
|
115
|
+
startDate: Date;
|
|
148
116
|
|
|
149
|
-
@Prop(
|
|
150
|
-
|
|
117
|
+
@Prop()
|
|
118
|
+
endDate: Date;
|
|
151
119
|
|
|
152
|
-
@Prop(
|
|
153
|
-
|
|
120
|
+
@Prop()
|
|
121
|
+
categoty: string;
|
|
122
|
+
}
|
|
154
123
|
|
|
155
|
-
|
|
156
|
-
collab: Collab;
|
|
124
|
+
export const ExclusivitySchema = SchemaFactory.createForClass(Exclusivity);
|
|
157
125
|
|
|
158
|
-
|
|
159
|
-
|
|
126
|
+
@Schema({ _id: false })
|
|
127
|
+
export class Scope {
|
|
128
|
+
@Prop({ type: DeliverySchema })
|
|
129
|
+
delivery: Delivery;
|
|
160
130
|
|
|
161
|
-
@Prop()
|
|
162
|
-
|
|
131
|
+
@Prop({ type: RightsSchema, required: false })
|
|
132
|
+
rights?: Rights;
|
|
163
133
|
|
|
164
|
-
@Prop()
|
|
165
|
-
|
|
134
|
+
@Prop({ type: PaymentSchema, required: false })
|
|
135
|
+
payment?: Payment;
|
|
166
136
|
|
|
167
|
-
@Prop()
|
|
168
|
-
|
|
137
|
+
@Prop({ type: PaymentSchema, required: false })
|
|
138
|
+
advisorPayment?: Payment;
|
|
169
139
|
|
|
170
|
-
@Prop()
|
|
171
|
-
|
|
140
|
+
@Prop({ type: CollabSchema, required: false })
|
|
141
|
+
collab?: Collab;
|
|
172
142
|
|
|
173
|
-
@Prop()
|
|
174
|
-
|
|
143
|
+
@Prop({ type: ExchangeSchema, required: false })
|
|
144
|
+
exchange?: Exchange;
|
|
175
145
|
|
|
176
|
-
@Prop()
|
|
177
|
-
|
|
146
|
+
@Prop({ type: ExclusivitySchema, required: false })
|
|
147
|
+
exclusivity?: Exclusivity;
|
|
178
148
|
}
|
|
179
149
|
|
|
180
150
|
export const ScopeSchema = SchemaFactory.createForClass(Scope);
|
|
@@ -203,26 +173,8 @@ export class Recruitment {
|
|
|
203
173
|
@Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Profile' })
|
|
204
174
|
profile: Types.ObjectId | Profile;
|
|
205
175
|
|
|
206
|
-
@Prop([{ type: MongooseSchema.Types.ObjectId, ref: 'Content' }])
|
|
207
|
-
reel: Types.ObjectId[] | Content[];
|
|
208
|
-
|
|
209
|
-
@Prop([{ type: MongooseSchema.Types.ObjectId, ref: 'Content' }])
|
|
210
|
-
image: Types.ObjectId[] | Content[];
|
|
211
|
-
|
|
212
|
-
@Prop([{ type: MongooseSchema.Types.ObjectId, ref: 'Content' }])
|
|
213
|
-
carousel: Types.ObjectId[] | Content[];
|
|
214
|
-
|
|
215
|
-
@Prop([{ type: MongooseSchema.Types.ObjectId, ref: 'Content' }])
|
|
216
|
-
story: Types.ObjectId[] | Content[];
|
|
217
|
-
|
|
218
|
-
@Prop([{ type: MongooseSchema.Types.ObjectId, ref: 'Content' }])
|
|
219
|
-
tiktok: Types.ObjectId[] | Content[];
|
|
220
|
-
|
|
221
|
-
@Prop([{ type: MongooseSchema.Types.ObjectId, ref: 'Content' }])
|
|
222
|
-
youtube: Types.ObjectId[] | Content[];
|
|
223
|
-
|
|
224
176
|
@Prop({ type: ScopeSchema })
|
|
225
|
-
scope
|
|
177
|
+
scope?: Scope;
|
|
226
178
|
|
|
227
179
|
@Prop({ default: Date.now, required: false })
|
|
228
180
|
createdAt?: Date;
|