Skip to content

Commit 65ed51f

Browse files
authored
Merge pull request #104 from TogetherCrew/103-add-twitter-related-fields-to-user-schema
103 add twitter related fields to user schema
2 parents 9638113 + a3a07e7 commit 65ed51f

File tree

4 files changed

+22
-1
lines changed

4 files changed

+22
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ User {
7171
flags?: number,
7272
premium_type?: number,
7373
public_flags?: number,
74+
twitterId?: string,
75+
twitterUsername?: string,
76+
twitterProfileImageUrl?: string,
77+
7478
}
7579
```
7680

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@togethercrew.dev/db",
3-
"version": "2.4.96",
3+
"version": "2.4.97",
44
"description": "All interactions with DB",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",

src/interfaces/User.interface.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,16 @@ export interface IUser {
1717
flags?: number;
1818
premium_type?: number;
1919
public_flags?: number;
20+
twitterId?: string | null;
21+
twitterUsername?: string | null;
22+
twitterProfileImageUrl?: string | null;
2023
}
2124

2225
export interface IUserUpdateBody {
2326
avatar?: string;
27+
twitterId?: string | null;
28+
twitterUsername?: string | null;
29+
twitterProfileImageUrl?: string | null;
2430
email?: string;
2531
verified?: boolean;
2632
}

src/models/schemas/User.schema.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ const userSchema = new Schema<IUser, UserModel>(
2525
avatar: {
2626
type: String,
2727
},
28+
twitterId: {
29+
type: String,
30+
},
31+
32+
twitterUsername: {
33+
type: String,
34+
},
35+
36+
twitterProfileImageUrl: {
37+
type: String,
38+
},
2839
},
2940
{ timestamps: true },
3041
);

0 commit comments

Comments
 (0)