@grapadigital/shared-schemas 1.0.6 → 1.0.7
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 +4 -0
- package/dist/index.js +4 -0
- package/dist/schemas/influencer.schema.d.ts +5 -5
- package/dist/schemas/influencer.schema.js +18 -18
- package/dist/schemas/profile.schema.d.ts +1 -10
- package/dist/schemas/profile.schema.js +1 -5
- package/dist/schemas/recruitment.schema.d.ts +4 -4
- package/dist/schemas/recruitment.schema.js +14 -14
- package/package.json +1 -1
- package/src/index.ts +4 -0
- package/src/schemas/influencer.schema.ts +49 -49
- package/src/schemas/profile.schema.ts +14 -26
- package/src/schemas/recruitment.schema.ts +5 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export * from './schemas/campaign.schema';
|
|
2
2
|
export * from './schemas/client.schema';
|
|
3
|
+
export * from './schemas/content.schema';
|
|
4
|
+
export * from './schemas/influencer.schema';
|
|
3
5
|
export * from './schemas/payment.schema';
|
|
6
|
+
export * from './schemas/profile.schema';
|
|
7
|
+
export * from './schemas/recruitment.schema';
|
package/dist/index.js
CHANGED
|
@@ -16,4 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./schemas/campaign.schema"), exports);
|
|
18
18
|
__exportStar(require("./schemas/client.schema"), exports);
|
|
19
|
+
__exportStar(require("./schemas/content.schema"), exports);
|
|
20
|
+
__exportStar(require("./schemas/influencer.schema"), exports);
|
|
19
21
|
__exportStar(require("./schemas/payment.schema"), exports);
|
|
22
|
+
__exportStar(require("./schemas/profile.schema"), exports);
|
|
23
|
+
__exportStar(require("./schemas/recruitment.schema"), exports);
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
|
-
import { HydratedDocument, Schema as MongooseSchema } from
|
|
26
|
+
import { HydratedDocument, Schema as MongooseSchema } from 'mongoose';
|
|
27
27
|
export type InfluencerDocument = HydratedDocument<Influencer>;
|
|
28
28
|
export declare class Address {
|
|
29
29
|
zipcode: string;
|
|
@@ -42,7 +42,7 @@ export declare const AddressSchema: MongooseSchema<Address, import("mongoose").M
|
|
|
42
42
|
} & {
|
|
43
43
|
__v: number;
|
|
44
44
|
}>;
|
|
45
|
-
export declare class
|
|
45
|
+
export declare class PaymentInfo {
|
|
46
46
|
legalName: string;
|
|
47
47
|
documentType: string;
|
|
48
48
|
document: string;
|
|
@@ -53,11 +53,11 @@ export declare class Payment {
|
|
|
53
53
|
pix: string;
|
|
54
54
|
pixType: string;
|
|
55
55
|
}
|
|
56
|
-
export declare const
|
|
56
|
+
export declare const PaymentInfoSchema: MongooseSchema<PaymentInfo, import("mongoose").Model<PaymentInfo, any, any, any, import("mongoose").Document<unknown, any, PaymentInfo> & PaymentInfo & {
|
|
57
57
|
_id: import("mongoose").Types.ObjectId;
|
|
58
58
|
} & {
|
|
59
59
|
__v: number;
|
|
60
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions,
|
|
60
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, PaymentInfo, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<PaymentInfo>> & import("mongoose").FlatRecord<PaymentInfo> & {
|
|
61
61
|
_id: import("mongoose").Types.ObjectId;
|
|
62
62
|
} & {
|
|
63
63
|
__v: number;
|
|
@@ -93,7 +93,7 @@ export declare class Influencer {
|
|
|
93
93
|
profession: string;
|
|
94
94
|
isExclusive: boolean;
|
|
95
95
|
address: Address;
|
|
96
|
-
payment:
|
|
96
|
+
payment: PaymentInfo;
|
|
97
97
|
advisor: Advisor;
|
|
98
98
|
profiles: MongooseSchema.Types.ObjectId[];
|
|
99
99
|
createdAt: Date;
|
|
@@ -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.InfluencerSchema = exports.Influencer = exports.AdvisorSchema = exports.Advisor = exports.
|
|
12
|
+
exports.InfluencerSchema = exports.Influencer = exports.AdvisorSchema = exports.Advisor = exports.PaymentInfoSchema = exports.PaymentInfo = exports.AddressSchema = exports.Address = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
15
|
let Address = class Address {
|
|
@@ -43,49 +43,49 @@ Address = __decorate([
|
|
|
43
43
|
], Address);
|
|
44
44
|
exports.Address = Address;
|
|
45
45
|
exports.AddressSchema = mongoose_1.SchemaFactory.createForClass(Address);
|
|
46
|
-
let
|
|
46
|
+
let PaymentInfo = class PaymentInfo {
|
|
47
47
|
};
|
|
48
48
|
__decorate([
|
|
49
49
|
(0, mongoose_1.Prop)(),
|
|
50
50
|
__metadata("design:type", String)
|
|
51
|
-
],
|
|
51
|
+
], PaymentInfo.prototype, "legalName", void 0);
|
|
52
52
|
__decorate([
|
|
53
53
|
(0, mongoose_1.Prop)(),
|
|
54
54
|
__metadata("design:type", String)
|
|
55
|
-
],
|
|
55
|
+
], PaymentInfo.prototype, "documentType", void 0);
|
|
56
56
|
__decorate([
|
|
57
57
|
(0, mongoose_1.Prop)(),
|
|
58
58
|
__metadata("design:type", String)
|
|
59
|
-
],
|
|
59
|
+
], PaymentInfo.prototype, "document", void 0);
|
|
60
60
|
__decorate([
|
|
61
61
|
(0, mongoose_1.Prop)(),
|
|
62
62
|
__metadata("design:type", String)
|
|
63
|
-
],
|
|
63
|
+
], PaymentInfo.prototype, "bank", void 0);
|
|
64
64
|
__decorate([
|
|
65
65
|
(0, mongoose_1.Prop)(),
|
|
66
66
|
__metadata("design:type", String)
|
|
67
|
-
],
|
|
67
|
+
], PaymentInfo.prototype, "agency", void 0);
|
|
68
68
|
__decorate([
|
|
69
69
|
(0, mongoose_1.Prop)(),
|
|
70
70
|
__metadata("design:type", String)
|
|
71
|
-
],
|
|
71
|
+
], PaymentInfo.prototype, "account", void 0);
|
|
72
72
|
__decorate([
|
|
73
73
|
(0, mongoose_1.Prop)(),
|
|
74
74
|
__metadata("design:type", String)
|
|
75
|
-
],
|
|
75
|
+
], PaymentInfo.prototype, "digit", void 0);
|
|
76
76
|
__decorate([
|
|
77
77
|
(0, mongoose_1.Prop)(),
|
|
78
78
|
__metadata("design:type", String)
|
|
79
|
-
],
|
|
79
|
+
], PaymentInfo.prototype, "pix", void 0);
|
|
80
80
|
__decorate([
|
|
81
81
|
(0, mongoose_1.Prop)(),
|
|
82
82
|
__metadata("design:type", String)
|
|
83
|
-
],
|
|
84
|
-
|
|
83
|
+
], PaymentInfo.prototype, "pixType", void 0);
|
|
84
|
+
PaymentInfo = __decorate([
|
|
85
85
|
(0, mongoose_1.Schema)({ _id: false })
|
|
86
|
-
],
|
|
87
|
-
exports.
|
|
88
|
-
exports.
|
|
86
|
+
], PaymentInfo);
|
|
87
|
+
exports.PaymentInfo = PaymentInfo;
|
|
88
|
+
exports.PaymentInfoSchema = mongoose_1.SchemaFactory.createForClass(PaymentInfo);
|
|
89
89
|
let Advisor = class Advisor {
|
|
90
90
|
};
|
|
91
91
|
__decorate([
|
|
@@ -172,15 +172,15 @@ __decorate([
|
|
|
172
172
|
__metadata("design:type", Address)
|
|
173
173
|
], Influencer.prototype, "address", void 0);
|
|
174
174
|
__decorate([
|
|
175
|
-
(0, mongoose_1.Prop)({ type: exports.
|
|
176
|
-
__metadata("design:type",
|
|
175
|
+
(0, mongoose_1.Prop)({ type: exports.PaymentInfoSchema }),
|
|
176
|
+
__metadata("design:type", PaymentInfo)
|
|
177
177
|
], Influencer.prototype, "payment", void 0);
|
|
178
178
|
__decorate([
|
|
179
179
|
(0, mongoose_1.Prop)({ type: exports.AdvisorSchema }),
|
|
180
180
|
__metadata("design:type", Advisor)
|
|
181
181
|
], Influencer.prototype, "advisor", void 0);
|
|
182
182
|
__decorate([
|
|
183
|
-
(0, mongoose_1.Prop)([{ type: mongoose_2.Schema.Types.ObjectId, ref:
|
|
183
|
+
(0, mongoose_1.Prop)([{ type: mongoose_2.Schema.Types.ObjectId, ref: 'Profile' }]),
|
|
184
184
|
__metadata("design:type", Array)
|
|
185
185
|
], Influencer.prototype, "profiles", void 0);
|
|
186
186
|
__decorate([
|
|
@@ -23,22 +23,13 @@
|
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
|
-
import { HydratedDocument, Schema as MongooseSchema } from
|
|
26
|
+
import { HydratedDocument, Schema as MongooseSchema } from 'mongoose';
|
|
27
27
|
export type ProfileDocument = HydratedDocument<Profile>;
|
|
28
|
-
export interface Metrics {
|
|
29
|
-
medianImpressionsFeed: number;
|
|
30
|
-
medianImpressionsStories: number;
|
|
31
|
-
medianReachFeed: number;
|
|
32
|
-
medianReachStories: number;
|
|
33
|
-
medianEngagementRateFeed: number;
|
|
34
|
-
medianEngagementRateStories: number;
|
|
35
|
-
}
|
|
36
28
|
export declare class Profile {
|
|
37
29
|
username: string;
|
|
38
30
|
followers: number;
|
|
39
31
|
picture: string;
|
|
40
32
|
socialnetwork: string;
|
|
41
|
-
metrics: Metrics;
|
|
42
33
|
type: string;
|
|
43
34
|
influencer: MongooseSchema.Types.ObjectId;
|
|
44
35
|
createdAt: Date;
|
|
@@ -30,16 +30,12 @@ __decorate([
|
|
|
30
30
|
(0, mongoose_1.Prop)(),
|
|
31
31
|
__metadata("design:type", String)
|
|
32
32
|
], Profile.prototype, "socialnetwork", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Mixed }),
|
|
35
|
-
__metadata("design:type", Object)
|
|
36
|
-
], Profile.prototype, "metrics", void 0);
|
|
37
33
|
__decorate([
|
|
38
34
|
(0, mongoose_1.Prop)(),
|
|
39
35
|
__metadata("design:type", String)
|
|
40
36
|
], Profile.prototype, "type", void 0);
|
|
41
37
|
__decorate([
|
|
42
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref:
|
|
38
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Influencer' }),
|
|
43
39
|
__metadata("design:type", mongoose_2.Schema.Types.ObjectId)
|
|
44
40
|
], Profile.prototype, "influencer", void 0);
|
|
45
41
|
__decorate([
|
|
@@ -83,7 +83,7 @@ export declare const InstallmentInfoSchema: MongooseSchema<InstallmentInfo, impo
|
|
|
83
83
|
} & {
|
|
84
84
|
__v: number;
|
|
85
85
|
}>;
|
|
86
|
-
export declare class
|
|
86
|
+
export declare class InfluencerPayment {
|
|
87
87
|
hasPayment: boolean;
|
|
88
88
|
hasInstallment: boolean;
|
|
89
89
|
value: number;
|
|
@@ -91,11 +91,11 @@ export declare class Payment {
|
|
|
91
91
|
deadline: number;
|
|
92
92
|
passThrough: boolean;
|
|
93
93
|
}
|
|
94
|
-
export declare const
|
|
94
|
+
export declare const InfluencerPaymentSchema: MongooseSchema<InfluencerPayment, import("mongoose").Model<InfluencerPayment, any, any, any, import("mongoose").Document<unknown, any, InfluencerPayment> & InfluencerPayment & {
|
|
95
95
|
_id: import("mongoose").Types.ObjectId;
|
|
96
96
|
} & {
|
|
97
97
|
__v: number;
|
|
98
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions,
|
|
98
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, InfluencerPayment, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<InfluencerPayment>> & import("mongoose").FlatRecord<InfluencerPayment> & {
|
|
99
99
|
_id: import("mongoose").Types.ObjectId;
|
|
100
100
|
} & {
|
|
101
101
|
__v: number;
|
|
@@ -146,7 +146,7 @@ export declare const CollabSchema: MongooseSchema<Collab, import("mongoose").Mod
|
|
|
146
146
|
export declare class Scope {
|
|
147
147
|
delivery: Delivery;
|
|
148
148
|
rights: Rights;
|
|
149
|
-
payment:
|
|
149
|
+
payment: InfluencerPayment;
|
|
150
150
|
advisorPayment: AdvisorPayment;
|
|
151
151
|
collab: Collab;
|
|
152
152
|
exchange: Exchange;
|
|
@@ -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.RecruitmentSchema = exports.Recruitment = exports.ScopeSchema = exports.Scope = exports.CollabSchema = exports.Collab = exports.ExchangeSchema = exports.Exchange = exports.AdvisorPaymentSchema = exports.AdvisorPayment = exports.
|
|
12
|
+
exports.RecruitmentSchema = exports.Recruitment = exports.ScopeSchema = exports.Scope = exports.CollabSchema = exports.Collab = exports.ExchangeSchema = exports.Exchange = exports.AdvisorPaymentSchema = exports.AdvisorPayment = exports.InfluencerPaymentSchema = exports.InfluencerPayment = 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 {
|
|
@@ -96,37 +96,37 @@ InstallmentInfo = __decorate([
|
|
|
96
96
|
], InstallmentInfo);
|
|
97
97
|
exports.InstallmentInfo = InstallmentInfo;
|
|
98
98
|
exports.InstallmentInfoSchema = mongoose_1.SchemaFactory.createForClass(InstallmentInfo);
|
|
99
|
-
let
|
|
99
|
+
let InfluencerPayment = class InfluencerPayment {
|
|
100
100
|
};
|
|
101
101
|
__decorate([
|
|
102
102
|
(0, mongoose_1.Prop)(),
|
|
103
103
|
__metadata("design:type", Boolean)
|
|
104
|
-
],
|
|
104
|
+
], InfluencerPayment.prototype, "hasPayment", void 0);
|
|
105
105
|
__decorate([
|
|
106
106
|
(0, mongoose_1.Prop)(),
|
|
107
107
|
__metadata("design:type", Boolean)
|
|
108
|
-
],
|
|
108
|
+
], InfluencerPayment.prototype, "hasInstallment", void 0);
|
|
109
109
|
__decorate([
|
|
110
110
|
(0, mongoose_1.Prop)(),
|
|
111
111
|
__metadata("design:type", Number)
|
|
112
|
-
],
|
|
112
|
+
], InfluencerPayment.prototype, "value", void 0);
|
|
113
113
|
__decorate([
|
|
114
114
|
(0, mongoose_1.Prop)([{ type: exports.InstallmentInfoSchema }]),
|
|
115
115
|
__metadata("design:type", Array)
|
|
116
|
-
],
|
|
116
|
+
], InfluencerPayment.prototype, "installmentInfo", void 0);
|
|
117
117
|
__decorate([
|
|
118
118
|
(0, mongoose_1.Prop)(),
|
|
119
119
|
__metadata("design:type", Number)
|
|
120
|
-
],
|
|
120
|
+
], InfluencerPayment.prototype, "deadline", void 0);
|
|
121
121
|
__decorate([
|
|
122
122
|
(0, mongoose_1.Prop)(),
|
|
123
123
|
__metadata("design:type", Boolean)
|
|
124
|
-
],
|
|
125
|
-
|
|
124
|
+
], InfluencerPayment.prototype, "passThrough", void 0);
|
|
125
|
+
InfluencerPayment = __decorate([
|
|
126
126
|
(0, mongoose_1.Schema)({ _id: false })
|
|
127
|
-
],
|
|
128
|
-
exports.
|
|
129
|
-
exports.
|
|
127
|
+
], InfluencerPayment);
|
|
128
|
+
exports.InfluencerPayment = InfluencerPayment;
|
|
129
|
+
exports.InfluencerPaymentSchema = mongoose_1.SchemaFactory.createForClass(InfluencerPayment);
|
|
130
130
|
let AdvisorPayment = class AdvisorPayment {
|
|
131
131
|
};
|
|
132
132
|
__decorate([
|
|
@@ -199,8 +199,8 @@ __decorate([
|
|
|
199
199
|
__metadata("design:type", Rights)
|
|
200
200
|
], Scope.prototype, "rights", void 0);
|
|
201
201
|
__decorate([
|
|
202
|
-
(0, mongoose_1.Prop)({ type: exports.
|
|
203
|
-
__metadata("design:type",
|
|
202
|
+
(0, mongoose_1.Prop)({ type: exports.InfluencerPaymentSchema }),
|
|
203
|
+
__metadata("design:type", InfluencerPayment)
|
|
204
204
|
], Scope.prototype, "payment", void 0);
|
|
205
205
|
__decorate([
|
|
206
206
|
(0, mongoose_1.Prop)({ type: exports.AdvisorPaymentSchema }),
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export * from './schemas/campaign.schema';
|
|
2
2
|
export * from './schemas/client.schema';
|
|
3
|
+
export * from './schemas/content.schema';
|
|
4
|
+
export * from './schemas/influencer.schema';
|
|
3
5
|
export * from './schemas/payment.schema';
|
|
6
|
+
export * from './schemas/profile.schema';
|
|
7
|
+
export * from './schemas/recruitment.schema';
|
|
@@ -1,141 +1,141 @@
|
|
|
1
|
-
import { Prop, Schema, SchemaFactory } from
|
|
2
|
-
import { HydratedDocument, Schema as MongooseSchema } from
|
|
1
|
+
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
|
2
|
+
import { HydratedDocument, Schema as MongooseSchema } from 'mongoose';
|
|
3
3
|
|
|
4
|
-
export type InfluencerDocument = HydratedDocument<Influencer
|
|
4
|
+
export type InfluencerDocument = HydratedDocument<Influencer>;
|
|
5
5
|
|
|
6
6
|
@Schema({ _id: false })
|
|
7
7
|
export class Address {
|
|
8
8
|
@Prop()
|
|
9
|
-
zipcode: string
|
|
9
|
+
zipcode: string;
|
|
10
10
|
|
|
11
11
|
@Prop()
|
|
12
|
-
city: string
|
|
12
|
+
city: string;
|
|
13
13
|
|
|
14
14
|
@Prop()
|
|
15
|
-
state: string
|
|
15
|
+
state: string;
|
|
16
16
|
|
|
17
17
|
@Prop()
|
|
18
|
-
street: string
|
|
18
|
+
street: string;
|
|
19
19
|
|
|
20
20
|
@Prop()
|
|
21
|
-
number: string
|
|
21
|
+
number: string;
|
|
22
22
|
|
|
23
23
|
@Prop()
|
|
24
|
-
complement: string
|
|
24
|
+
complement: string;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
export const AddressSchema = SchemaFactory.createForClass(Address)
|
|
27
|
+
export const AddressSchema = SchemaFactory.createForClass(Address);
|
|
28
28
|
|
|
29
29
|
@Schema({ _id: false })
|
|
30
|
-
export class
|
|
30
|
+
export class PaymentInfo {
|
|
31
31
|
@Prop()
|
|
32
|
-
legalName: string
|
|
32
|
+
legalName: string;
|
|
33
33
|
|
|
34
34
|
@Prop()
|
|
35
|
-
documentType: string
|
|
35
|
+
documentType: string;
|
|
36
36
|
|
|
37
37
|
@Prop()
|
|
38
|
-
document: string
|
|
38
|
+
document: string;
|
|
39
39
|
|
|
40
40
|
@Prop()
|
|
41
|
-
bank: string
|
|
41
|
+
bank: string;
|
|
42
42
|
|
|
43
43
|
@Prop()
|
|
44
|
-
agency: string
|
|
44
|
+
agency: string;
|
|
45
45
|
|
|
46
46
|
@Prop()
|
|
47
|
-
account: string
|
|
47
|
+
account: string;
|
|
48
48
|
|
|
49
49
|
@Prop()
|
|
50
|
-
digit: string
|
|
50
|
+
digit: string;
|
|
51
51
|
|
|
52
52
|
@Prop()
|
|
53
|
-
pix: string
|
|
53
|
+
pix: string;
|
|
54
54
|
|
|
55
55
|
@Prop()
|
|
56
|
-
pixType: string
|
|
56
|
+
pixType: string;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
export const
|
|
59
|
+
export const PaymentInfoSchema = SchemaFactory.createForClass(PaymentInfo);
|
|
60
60
|
|
|
61
61
|
@Schema({ _id: false })
|
|
62
62
|
export class Advisor {
|
|
63
63
|
@Prop()
|
|
64
|
-
firstName: string
|
|
64
|
+
firstName: string;
|
|
65
65
|
|
|
66
66
|
@Prop()
|
|
67
|
-
lastName: string
|
|
67
|
+
lastName: string;
|
|
68
68
|
|
|
69
69
|
@Prop()
|
|
70
|
-
email: string
|
|
70
|
+
email: string;
|
|
71
71
|
|
|
72
72
|
@Prop()
|
|
73
|
-
legalName: string
|
|
73
|
+
legalName: string;
|
|
74
74
|
|
|
75
75
|
@Prop()
|
|
76
|
-
document: string
|
|
76
|
+
document: string;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
export const AdvisorSchema = SchemaFactory.createForClass(Advisor)
|
|
79
|
+
export const AdvisorSchema = SchemaFactory.createForClass(Advisor);
|
|
80
80
|
|
|
81
81
|
@Schema({ timestamps: true })
|
|
82
82
|
export class Influencer {
|
|
83
83
|
@Prop({ type: MongooseSchema.Types.ObjectId, auto: true })
|
|
84
|
-
_id: MongooseSchema.Types.ObjectId
|
|
84
|
+
_id: MongooseSchema.Types.ObjectId;
|
|
85
85
|
|
|
86
86
|
@Prop()
|
|
87
|
-
firstName: string
|
|
87
|
+
firstName: string;
|
|
88
88
|
|
|
89
89
|
@Prop()
|
|
90
|
-
lastName: string
|
|
90
|
+
lastName: string;
|
|
91
91
|
|
|
92
92
|
@Prop()
|
|
93
|
-
email: string
|
|
93
|
+
email: string;
|
|
94
94
|
|
|
95
95
|
@Prop()
|
|
96
|
-
phone: string
|
|
96
|
+
phone: string;
|
|
97
97
|
|
|
98
98
|
@Prop()
|
|
99
|
-
picture: string
|
|
99
|
+
picture: string;
|
|
100
100
|
|
|
101
101
|
@Prop()
|
|
102
|
-
rg: string
|
|
102
|
+
rg: string;
|
|
103
103
|
|
|
104
104
|
@Prop()
|
|
105
|
-
cpf: string
|
|
105
|
+
cpf: string;
|
|
106
106
|
|
|
107
107
|
@Prop()
|
|
108
|
-
birthday: Date
|
|
108
|
+
birthday: Date;
|
|
109
109
|
|
|
110
110
|
@Prop()
|
|
111
|
-
maritalStatus: string
|
|
111
|
+
maritalStatus: string;
|
|
112
112
|
|
|
113
113
|
@Prop()
|
|
114
|
-
nationality: string
|
|
114
|
+
nationality: string;
|
|
115
115
|
|
|
116
116
|
@Prop()
|
|
117
|
-
profession: string
|
|
117
|
+
profession: string;
|
|
118
118
|
|
|
119
119
|
@Prop({ type: Boolean, default: false })
|
|
120
|
-
isExclusive: boolean
|
|
120
|
+
isExclusive: boolean;
|
|
121
121
|
|
|
122
122
|
@Prop({ type: AddressSchema })
|
|
123
|
-
address: Address
|
|
123
|
+
address: Address;
|
|
124
124
|
|
|
125
|
-
@Prop({ type:
|
|
126
|
-
payment:
|
|
125
|
+
@Prop({ type: PaymentInfoSchema })
|
|
126
|
+
payment: PaymentInfo;
|
|
127
127
|
|
|
128
128
|
@Prop({ type: AdvisorSchema })
|
|
129
|
-
advisor: Advisor
|
|
129
|
+
advisor: Advisor;
|
|
130
130
|
|
|
131
|
-
@Prop([{ type: MongooseSchema.Types.ObjectId, ref:
|
|
132
|
-
profiles: MongooseSchema.Types.ObjectId[]
|
|
131
|
+
@Prop([{ type: MongooseSchema.Types.ObjectId, ref: 'Profile' }])
|
|
132
|
+
profiles: MongooseSchema.Types.ObjectId[];
|
|
133
133
|
|
|
134
134
|
@Prop({ default: Date.now })
|
|
135
|
-
createdAt: Date
|
|
135
|
+
createdAt: Date;
|
|
136
136
|
|
|
137
137
|
@Prop({ default: Date.now })
|
|
138
|
-
updatedAt: Date
|
|
138
|
+
updatedAt: Date;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
export const InfluencerSchema = SchemaFactory.createForClass(Influencer)
|
|
141
|
+
export const InfluencerSchema = SchemaFactory.createForClass(Influencer);
|
|
@@ -1,45 +1,33 @@
|
|
|
1
|
-
import { Prop, Schema, SchemaFactory } from
|
|
2
|
-
import { HydratedDocument, Schema as MongooseSchema } from
|
|
3
|
-
|
|
4
|
-
export type ProfileDocument = HydratedDocument<Profile
|
|
5
|
-
|
|
6
|
-
export interface Metrics {
|
|
7
|
-
medianImpressionsFeed: number
|
|
8
|
-
medianImpressionsStories: number
|
|
9
|
-
medianReachFeed: number
|
|
10
|
-
medianReachStories: number
|
|
11
|
-
medianEngagementRateFeed: number
|
|
12
|
-
medianEngagementRateStories: number
|
|
13
|
-
}
|
|
1
|
+
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
|
2
|
+
import { HydratedDocument, Schema as MongooseSchema } from 'mongoose';
|
|
3
|
+
|
|
4
|
+
export type ProfileDocument = HydratedDocument<Profile>;
|
|
14
5
|
|
|
15
6
|
@Schema({ timestamps: true })
|
|
16
7
|
export class Profile {
|
|
17
8
|
@Prop()
|
|
18
|
-
username: string
|
|
9
|
+
username: string;
|
|
19
10
|
|
|
20
11
|
@Prop()
|
|
21
|
-
followers: number
|
|
12
|
+
followers: number;
|
|
22
13
|
|
|
23
14
|
@Prop()
|
|
24
|
-
picture: string
|
|
15
|
+
picture: string;
|
|
25
16
|
|
|
26
17
|
@Prop()
|
|
27
|
-
socialnetwork: string
|
|
28
|
-
|
|
29
|
-
@Prop({ type: MongooseSchema.Types.Mixed })
|
|
30
|
-
metrics: Metrics
|
|
18
|
+
socialnetwork: string;
|
|
31
19
|
|
|
32
20
|
@Prop()
|
|
33
|
-
type: string
|
|
21
|
+
type: string;
|
|
34
22
|
|
|
35
|
-
@Prop({ type: MongooseSchema.Types.ObjectId, ref:
|
|
36
|
-
influencer: MongooseSchema.Types.ObjectId
|
|
23
|
+
@Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Influencer' })
|
|
24
|
+
influencer: MongooseSchema.Types.ObjectId;
|
|
37
25
|
|
|
38
26
|
@Prop({ default: Date.now })
|
|
39
|
-
createdAt: Date
|
|
27
|
+
createdAt: Date;
|
|
40
28
|
|
|
41
29
|
@Prop({ default: Date.now })
|
|
42
|
-
updatedAt: Date
|
|
30
|
+
updatedAt: Date;
|
|
43
31
|
}
|
|
44
32
|
|
|
45
|
-
export const ProfileSchema = SchemaFactory.createForClass(Profile)
|
|
33
|
+
export const ProfileSchema = SchemaFactory.createForClass(Profile);
|
|
@@ -66,7 +66,7 @@ export const InstallmentInfoSchema =
|
|
|
66
66
|
SchemaFactory.createForClass(InstallmentInfo);
|
|
67
67
|
|
|
68
68
|
@Schema({ _id: false })
|
|
69
|
-
export class
|
|
69
|
+
export class InfluencerPayment {
|
|
70
70
|
@Prop()
|
|
71
71
|
hasPayment: boolean;
|
|
72
72
|
|
|
@@ -86,7 +86,8 @@ export class Payment {
|
|
|
86
86
|
passThrough: boolean;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
export const
|
|
89
|
+
export const InfluencerPaymentSchema =
|
|
90
|
+
SchemaFactory.createForClass(InfluencerPayment);
|
|
90
91
|
|
|
91
92
|
@Schema({ _id: false })
|
|
92
93
|
export class AdvisorPayment {
|
|
@@ -142,8 +143,8 @@ export class Scope {
|
|
|
142
143
|
@Prop({ type: RightsSchema })
|
|
143
144
|
rights: Rights;
|
|
144
145
|
|
|
145
|
-
@Prop({ type:
|
|
146
|
-
payment:
|
|
146
|
+
@Prop({ type: InfluencerPaymentSchema })
|
|
147
|
+
payment: InfluencerPayment;
|
|
147
148
|
|
|
148
149
|
@Prop({ type: AdvisorPaymentSchema })
|
|
149
150
|
advisorPayment: AdvisorPayment;
|