@grapadigital/shared-schemas 1.0.37 → 1.0.39
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/client.schema.d.ts +4 -4
- package/dist/schemas/content.schema.d.ts +3 -3
- package/dist/schemas/content.schema.js +2 -2
- package/dist/schemas/influencer.schema.d.ts +3 -4
- package/dist/schemas/influencer.schema.js +3 -5
- package/dist/schemas/profile.schema.d.ts +5 -4
- package/dist/schemas/profile.schema.js +4 -0
- package/dist/schemas/recruitment.schema.d.ts +1 -1
- package/dist/schemas/recruitment.schema.js +1 -1
- package/dist/schemas/supplier.schema.d.ts +4 -4
- package/dist/schemas/token.schema.d.ts +8 -7
- package/dist/schemas/token.schema.js +5 -0
- package/dist/schemas/user.schema.d.ts +17 -16
- package/dist/schemas/user.schema.js +5 -0
- package/package.json +1 -1
- package/src/schemas/content.schema.ts +2 -2
- package/src/schemas/influencer.schema.ts +4 -5
- package/src/schemas/profile.schema.ts +3 -0
- package/src/schemas/recruitment.schema.ts +2 -2
- package/src/schemas/token.schema.ts +4 -1
- package/src/schemas/user.schema.ts +4 -1
|
@@ -42,12 +42,12 @@ export declare const ClusterSchema: import("mongoose").Schema<Cluster, import("m
|
|
|
42
42
|
export declare class Client extends User {
|
|
43
43
|
clusters: Cluster[];
|
|
44
44
|
}
|
|
45
|
-
export declare const ClientSchema: import("mongoose").Schema<Client, import("mongoose").Model<Client, any, any, any, import("mongoose").Document<unknown, any, Client> & Client & {
|
|
45
|
+
export declare const ClientSchema: import("mongoose").Schema<Client, import("mongoose").Model<Client, any, any, any, import("mongoose").Document<unknown, any, Client> & Client & Required<{
|
|
46
46
|
_id: import("mongoose").Types.ObjectId;
|
|
47
|
-
} & {
|
|
47
|
+
}> & {
|
|
48
48
|
__v: number;
|
|
49
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Client, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Client>> & import("mongoose").FlatRecord<Client> & {
|
|
49
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Client, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Client>> & import("mongoose").FlatRecord<Client> & Required<{
|
|
50
50
|
_id: import("mongoose").Types.ObjectId;
|
|
51
|
-
} & {
|
|
51
|
+
}> & {
|
|
52
52
|
__v: number;
|
|
53
53
|
}>;
|
|
@@ -67,7 +67,7 @@ export declare const EstimatesSchema: MongooseSchema<Estimates, import("mongoose
|
|
|
67
67
|
__v: number;
|
|
68
68
|
}>;
|
|
69
69
|
export declare class Content {
|
|
70
|
-
_id
|
|
70
|
+
_id?: Types.ObjectId;
|
|
71
71
|
caption: string;
|
|
72
72
|
thumbnailUrl: string;
|
|
73
73
|
link: string;
|
|
@@ -91,11 +91,11 @@ export declare class Content {
|
|
|
91
91
|
updatedAt?: Date;
|
|
92
92
|
}
|
|
93
93
|
export declare const ContentSchema: MongooseSchema<Content, import("mongoose").Model<Content, any, any, any, import("mongoose").Document<unknown, any, Content> & Content & Required<{
|
|
94
|
-
_id:
|
|
94
|
+
_id: Types.ObjectId;
|
|
95
95
|
}> & {
|
|
96
96
|
__v: number;
|
|
97
97
|
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Content, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Content>> & import("mongoose").FlatRecord<Content> & Required<{
|
|
98
|
-
_id:
|
|
98
|
+
_id: Types.ObjectId;
|
|
99
99
|
}> & {
|
|
100
100
|
__v: number;
|
|
101
101
|
}>;
|
|
@@ -97,8 +97,8 @@ exports.EstimatesSchema = mongoose_1.SchemaFactory.createForClass(Estimates);
|
|
|
97
97
|
let Content = class Content {
|
|
98
98
|
};
|
|
99
99
|
__decorate([
|
|
100
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, auto: true }),
|
|
101
|
-
__metadata("design:type", mongoose_2.
|
|
100
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, auto: true, required: false }),
|
|
101
|
+
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
102
102
|
], Content.prototype, "_id", void 0);
|
|
103
103
|
__decorate([
|
|
104
104
|
(0, mongoose_1.Prop)(),
|
|
@@ -42,18 +42,17 @@ export declare const AdvisorSchema: MongooseSchema<Advisor, import("mongoose").M
|
|
|
42
42
|
__v: number;
|
|
43
43
|
}>;
|
|
44
44
|
export declare class Influencer extends User {
|
|
45
|
-
_id: MongooseSchema.Types.ObjectId;
|
|
46
45
|
financialManagementSheet?: string;
|
|
47
46
|
isExclusive: boolean;
|
|
48
47
|
advisor?: Advisor;
|
|
49
|
-
profiles
|
|
48
|
+
profiles?: Types.ObjectId[] | Profile[];
|
|
50
49
|
}
|
|
51
50
|
export declare const InfluencerSchema: MongooseSchema<Influencer, import("mongoose").Model<Influencer, any, any, any, import("mongoose").Document<unknown, any, Influencer> & Influencer & Required<{
|
|
52
|
-
_id:
|
|
51
|
+
_id: Types.ObjectId;
|
|
53
52
|
}> & {
|
|
54
53
|
__v: number;
|
|
55
54
|
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Influencer, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Influencer>> & import("mongoose").FlatRecord<Influencer> & Required<{
|
|
56
|
-
_id:
|
|
55
|
+
_id: Types.ObjectId;
|
|
57
56
|
}> & {
|
|
58
57
|
__v: number;
|
|
59
58
|
}>;
|
|
@@ -34,10 +34,6 @@ exports.Advisor = Advisor;
|
|
|
34
34
|
exports.AdvisorSchema = mongoose_1.SchemaFactory.createForClass(Advisor);
|
|
35
35
|
let Influencer = class Influencer extends user_schema_1.User {
|
|
36
36
|
};
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, auto: true }),
|
|
39
|
-
__metadata("design:type", mongoose_2.Schema.Types.ObjectId)
|
|
40
|
-
], Influencer.prototype, "_id", void 0);
|
|
41
37
|
__decorate([
|
|
42
38
|
(0, mongoose_1.Prop)({ required: false }),
|
|
43
39
|
__metadata("design:type", String)
|
|
@@ -51,7 +47,9 @@ __decorate([
|
|
|
51
47
|
__metadata("design:type", Advisor)
|
|
52
48
|
], Influencer.prototype, "advisor", void 0);
|
|
53
49
|
__decorate([
|
|
54
|
-
(0, mongoose_1.Prop)([
|
|
50
|
+
(0, mongoose_1.Prop)([
|
|
51
|
+
{ type: mongoose_2.Schema.Types.ObjectId, ref: 'Profile', required: false },
|
|
52
|
+
]),
|
|
55
53
|
__metadata("design:type", Array)
|
|
56
54
|
], Influencer.prototype, "profiles", void 0);
|
|
57
55
|
Influencer = __decorate([
|
|
@@ -27,6 +27,7 @@ import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
|
|
|
27
27
|
import { Influencer } from './influencer.schema';
|
|
28
28
|
export type ProfileDocument = HydratedDocument<Profile>;
|
|
29
29
|
export declare class Profile {
|
|
30
|
+
_id?: Types.ObjectId;
|
|
30
31
|
username: string;
|
|
31
32
|
followers: number;
|
|
32
33
|
picture: string;
|
|
@@ -36,12 +37,12 @@ export declare class Profile {
|
|
|
36
37
|
createdAt?: Date;
|
|
37
38
|
updatedAt?: Date;
|
|
38
39
|
}
|
|
39
|
-
export declare const ProfileSchema: MongooseSchema<Profile, import("mongoose").Model<Profile, any, any, any, import("mongoose").Document<unknown, any, Profile> & Profile & {
|
|
40
|
+
export declare const ProfileSchema: MongooseSchema<Profile, import("mongoose").Model<Profile, any, any, any, import("mongoose").Document<unknown, any, Profile> & Profile & Required<{
|
|
40
41
|
_id: Types.ObjectId;
|
|
41
|
-
} & {
|
|
42
|
+
}> & {
|
|
42
43
|
__v: number;
|
|
43
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Profile, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Profile>> & import("mongoose").FlatRecord<Profile> & {
|
|
44
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Profile, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Profile>> & import("mongoose").FlatRecord<Profile> & Required<{
|
|
44
45
|
_id: Types.ObjectId;
|
|
45
|
-
} & {
|
|
46
|
+
}> & {
|
|
46
47
|
__v: number;
|
|
47
48
|
}>;
|
|
@@ -14,6 +14,10 @@ const mongoose_1 = require("@nestjs/mongoose");
|
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
15
|
let Profile = class Profile {
|
|
16
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
|
+
], Profile.prototype, "_id", void 0);
|
|
17
21
|
__decorate([
|
|
18
22
|
(0, mongoose_1.Prop)(),
|
|
19
23
|
__metadata("design:type", String)
|
|
@@ -170,7 +170,7 @@ export declare const ScopeSchema: MongooseSchema<Scope, import("mongoose").Model
|
|
|
170
170
|
__v: number;
|
|
171
171
|
}>;
|
|
172
172
|
export declare class Recruitment {
|
|
173
|
-
_id
|
|
173
|
+
_id?: Types.ObjectId;
|
|
174
174
|
username: string;
|
|
175
175
|
picture: string;
|
|
176
176
|
status: 'selected' | 'inContact' | 'inApproval' | 'recruited' | 'removed';
|
|
@@ -246,7 +246,7 @@ exports.ScopeSchema = mongoose_1.SchemaFactory.createForClass(Scope);
|
|
|
246
246
|
let Recruitment = class Recruitment {
|
|
247
247
|
};
|
|
248
248
|
__decorate([
|
|
249
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, auto: true }),
|
|
249
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, auto: true, required: false }),
|
|
250
250
|
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
251
251
|
], Recruitment.prototype, "_id", void 0);
|
|
252
252
|
__decorate([
|
|
@@ -28,12 +28,12 @@ import { User } from './user.schema';
|
|
|
28
28
|
export type SupplierDocument = HydratedDocument<Supplier>;
|
|
29
29
|
export declare class Supplier extends User {
|
|
30
30
|
}
|
|
31
|
-
export declare const SupplierSchema: import("mongoose").Schema<Supplier, import("mongoose").Model<Supplier, any, any, any, import("mongoose").Document<unknown, any, Supplier> & Supplier & {
|
|
31
|
+
export declare const SupplierSchema: import("mongoose").Schema<Supplier, import("mongoose").Model<Supplier, any, any, any, import("mongoose").Document<unknown, any, Supplier> & Supplier & Required<{
|
|
32
32
|
_id: import("mongoose").Types.ObjectId;
|
|
33
|
-
} & {
|
|
33
|
+
}> & {
|
|
34
34
|
__v: number;
|
|
35
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Supplier, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Supplier>> & import("mongoose").FlatRecord<Supplier> & {
|
|
35
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Supplier, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Supplier>> & import("mongoose").FlatRecord<Supplier> & Required<{
|
|
36
36
|
_id: import("mongoose").Types.ObjectId;
|
|
37
|
-
} & {
|
|
37
|
+
}> & {
|
|
38
38
|
__v: number;
|
|
39
39
|
}>;
|
|
@@ -23,9 +23,10 @@
|
|
|
23
23
|
/// <reference types="mongoose/types/virtuals" />
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
|
-
import { HydratedDocument } from 'mongoose';
|
|
26
|
+
import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
|
|
27
27
|
export type TokenDocument = HydratedDocument<Token>;
|
|
28
28
|
export declare class Token {
|
|
29
|
+
_id?: Types.ObjectId;
|
|
29
30
|
profileId: string;
|
|
30
31
|
type: string;
|
|
31
32
|
provider: string;
|
|
@@ -35,12 +36,12 @@ export declare class Token {
|
|
|
35
36
|
createdAt?: Date;
|
|
36
37
|
updatedAt?: Date;
|
|
37
38
|
}
|
|
38
|
-
export declare const TokenSchema:
|
|
39
|
-
_id:
|
|
40
|
-
} & {
|
|
39
|
+
export declare const TokenSchema: MongooseSchema<Token, import("mongoose").Model<Token, any, any, any, import("mongoose").Document<unknown, any, Token> & Token & Required<{
|
|
40
|
+
_id: Types.ObjectId;
|
|
41
|
+
}> & {
|
|
41
42
|
__v: number;
|
|
42
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Token, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Token>> & import("mongoose").FlatRecord<Token> & {
|
|
43
|
-
_id:
|
|
44
|
-
} & {
|
|
43
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Token, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Token>> & import("mongoose").FlatRecord<Token> & Required<{
|
|
44
|
+
_id: Types.ObjectId;
|
|
45
|
+
}> & {
|
|
45
46
|
__v: number;
|
|
46
47
|
}>;
|
|
@@ -11,8 +11,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.TokenSchema = exports.Token = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const mongoose_2 = require("mongoose");
|
|
14
15
|
let Token = class Token {
|
|
15
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
|
+
], Token.prototype, "_id", void 0);
|
|
16
21
|
__decorate([
|
|
17
22
|
(0, mongoose_1.Prop)(),
|
|
18
23
|
__metadata("design:type", String)
|
|
@@ -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 } from 'mongoose';
|
|
26
|
+
import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
|
|
27
27
|
export type UserDocument = HydratedDocument<User>;
|
|
28
28
|
export declare class Address {
|
|
29
29
|
zipcode: string;
|
|
@@ -33,12 +33,12 @@ export declare class Address {
|
|
|
33
33
|
number: string;
|
|
34
34
|
complement: string;
|
|
35
35
|
}
|
|
36
|
-
export declare const AddressSchema:
|
|
37
|
-
_id:
|
|
36
|
+
export declare const AddressSchema: MongooseSchema<Address, import("mongoose").Model<Address, any, any, any, import("mongoose").Document<unknown, any, Address> & Address & {
|
|
37
|
+
_id: Types.ObjectId;
|
|
38
38
|
} & {
|
|
39
39
|
__v: number;
|
|
40
40
|
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Address, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Address>> & import("mongoose").FlatRecord<Address> & {
|
|
41
|
-
_id:
|
|
41
|
+
_id: Types.ObjectId;
|
|
42
42
|
} & {
|
|
43
43
|
__v: number;
|
|
44
44
|
}>;
|
|
@@ -51,12 +51,12 @@ export declare class Company {
|
|
|
51
51
|
digit: string;
|
|
52
52
|
pix: string;
|
|
53
53
|
}
|
|
54
|
-
export declare const CompanySchema:
|
|
55
|
-
_id:
|
|
54
|
+
export declare const CompanySchema: MongooseSchema<Company, import("mongoose").Model<Company, any, any, any, import("mongoose").Document<unknown, any, Company> & Company & {
|
|
55
|
+
_id: Types.ObjectId;
|
|
56
56
|
} & {
|
|
57
57
|
__v: number;
|
|
58
58
|
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Company, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Company>> & import("mongoose").FlatRecord<Company> & {
|
|
59
|
-
_id:
|
|
59
|
+
_id: Types.ObjectId;
|
|
60
60
|
} & {
|
|
61
61
|
__v: number;
|
|
62
62
|
}>;
|
|
@@ -68,16 +68,17 @@ export declare class Individual {
|
|
|
68
68
|
nationality: string;
|
|
69
69
|
profession: string;
|
|
70
70
|
}
|
|
71
|
-
export declare const IndividualSchema:
|
|
72
|
-
_id:
|
|
71
|
+
export declare const IndividualSchema: MongooseSchema<Individual, import("mongoose").Model<Individual, any, any, any, import("mongoose").Document<unknown, any, Individual> & Individual & {
|
|
72
|
+
_id: Types.ObjectId;
|
|
73
73
|
} & {
|
|
74
74
|
__v: number;
|
|
75
75
|
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Individual, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Individual>> & import("mongoose").FlatRecord<Individual> & {
|
|
76
|
-
_id:
|
|
76
|
+
_id: Types.ObjectId;
|
|
77
77
|
} & {
|
|
78
78
|
__v: number;
|
|
79
79
|
}>;
|
|
80
80
|
export declare class User {
|
|
81
|
+
_id?: Types.ObjectId;
|
|
81
82
|
name: string;
|
|
82
83
|
email?: string;
|
|
83
84
|
phone?: string;
|
|
@@ -88,12 +89,12 @@ export declare class User {
|
|
|
88
89
|
createdAt?: Date;
|
|
89
90
|
updatedAt?: Date;
|
|
90
91
|
}
|
|
91
|
-
export declare const UserSchema:
|
|
92
|
-
_id:
|
|
93
|
-
} & {
|
|
92
|
+
export declare const UserSchema: MongooseSchema<User, import("mongoose").Model<User, any, any, any, import("mongoose").Document<unknown, any, User> & User & Required<{
|
|
93
|
+
_id: Types.ObjectId;
|
|
94
|
+
}> & {
|
|
94
95
|
__v: number;
|
|
95
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, User, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<User>> & import("mongoose").FlatRecord<User> & {
|
|
96
|
-
_id:
|
|
97
|
-
} & {
|
|
96
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, User, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<User>> & import("mongoose").FlatRecord<User> & Required<{
|
|
97
|
+
_id: Types.ObjectId;
|
|
98
|
+
}> & {
|
|
98
99
|
__v: number;
|
|
99
100
|
}>;
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.UserSchema = exports.User = exports.IndividualSchema = exports.Individual = exports.CompanySchema = exports.Company = exports.AddressSchema = exports.Address = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const mongoose_2 = require("mongoose");
|
|
14
15
|
let Address = class Address {
|
|
15
16
|
};
|
|
16
17
|
__decorate([
|
|
@@ -110,6 +111,10 @@ exports.Individual = Individual;
|
|
|
110
111
|
exports.IndividualSchema = mongoose_1.SchemaFactory.createForClass(Individual);
|
|
111
112
|
let User = class User {
|
|
112
113
|
};
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, auto: true, required: false }),
|
|
116
|
+
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
117
|
+
], User.prototype, "_id", void 0);
|
|
113
118
|
__decorate([
|
|
114
119
|
(0, mongoose_1.Prop)(),
|
|
115
120
|
__metadata("design:type", String)
|
package/package.json
CHANGED
|
@@ -68,8 +68,8 @@ export const EstimatesSchema = SchemaFactory.createForClass(Estimates);
|
|
|
68
68
|
|
|
69
69
|
@Schema({ timestamps: true })
|
|
70
70
|
export class Content {
|
|
71
|
-
@Prop({ type: MongooseSchema.Types.ObjectId, auto: true })
|
|
72
|
-
_id
|
|
71
|
+
@Prop({ type: MongooseSchema.Types.ObjectId, auto: true, required: false })
|
|
72
|
+
_id?: Types.ObjectId;
|
|
73
73
|
|
|
74
74
|
@Prop()
|
|
75
75
|
caption: string;
|
|
@@ -20,9 +20,6 @@ export const AdvisorSchema = SchemaFactory.createForClass(Advisor);
|
|
|
20
20
|
|
|
21
21
|
@Schema({ timestamps: true })
|
|
22
22
|
export class Influencer extends User {
|
|
23
|
-
@Prop({ type: MongooseSchema.Types.ObjectId, auto: true })
|
|
24
|
-
_id: MongooseSchema.Types.ObjectId;
|
|
25
|
-
|
|
26
23
|
@Prop({ required: false })
|
|
27
24
|
financialManagementSheet?: string;
|
|
28
25
|
|
|
@@ -32,8 +29,10 @@ export class Influencer extends User {
|
|
|
32
29
|
@Prop({ type: AdvisorSchema, required: false })
|
|
33
30
|
advisor?: Advisor;
|
|
34
31
|
|
|
35
|
-
@Prop([
|
|
36
|
-
|
|
32
|
+
@Prop([
|
|
33
|
+
{ type: MongooseSchema.Types.ObjectId, ref: 'Profile', required: false },
|
|
34
|
+
])
|
|
35
|
+
profiles?: Types.ObjectId[] | Profile[];
|
|
37
36
|
}
|
|
38
37
|
|
|
39
38
|
export const InfluencerSchema = SchemaFactory.createForClass(Influencer);
|
|
@@ -181,8 +181,8 @@ export const ScopeSchema = SchemaFactory.createForClass(Scope);
|
|
|
181
181
|
|
|
182
182
|
@Schema({ timestamps: true })
|
|
183
183
|
export class Recruitment {
|
|
184
|
-
@Prop({ type: MongooseSchema.Types.ObjectId, auto: true })
|
|
185
|
-
_id
|
|
184
|
+
@Prop({ type: MongooseSchema.Types.ObjectId, auto: true, required: false })
|
|
185
|
+
_id?: Types.ObjectId;
|
|
186
186
|
|
|
187
187
|
@Prop()
|
|
188
188
|
username: string;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
|
2
|
-
import { HydratedDocument } from 'mongoose';
|
|
2
|
+
import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
|
|
3
3
|
|
|
4
4
|
export type TokenDocument = HydratedDocument<Token>;
|
|
5
5
|
|
|
6
6
|
@Schema({ timestamps: true })
|
|
7
7
|
export class Token {
|
|
8
|
+
@Prop({ type: MongooseSchema.Types.ObjectId, auto: true, required: false })
|
|
9
|
+
_id?: Types.ObjectId;
|
|
10
|
+
|
|
8
11
|
@Prop()
|
|
9
12
|
profileId: string;
|
|
10
13
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
|
2
|
-
import { HydratedDocument } from 'mongoose';
|
|
2
|
+
import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
|
|
3
3
|
|
|
4
4
|
export type UserDocument = HydratedDocument<User>;
|
|
5
5
|
|
|
@@ -77,6 +77,9 @@ export const IndividualSchema = SchemaFactory.createForClass(Individual);
|
|
|
77
77
|
|
|
78
78
|
@Schema({ timestamps: true })
|
|
79
79
|
export class User {
|
|
80
|
+
@Prop({ type: MongooseSchema.Types.ObjectId, auto: true, required: false })
|
|
81
|
+
_id?: Types.ObjectId;
|
|
82
|
+
|
|
80
83
|
@Prop()
|
|
81
84
|
name: string;
|
|
82
85
|
|