diff --git a/README.md b/README.md index d2b1a11..151be47 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ User { email?: string, communities?: [Types.ObjectId] tcaAt?: Date; + unverifiedTelegramUsername?:string; } ``` diff --git a/__tests__/unit/models/user.model.test.ts b/__tests__/unit/models/user.model.test.ts index d450f46..281d1f6 100644 --- a/__tests__/unit/models/user.model.test.ts +++ b/__tests__/unit/models/user.model.test.ts @@ -14,6 +14,7 @@ describe('User model', () => { discordId: '1234', email: 'email@yahoo.com', communities: [new Types.ObjectId(), new Types.ObjectId()], + unverifiedTelegramUsername: "alex_jane" }; }); diff --git a/package.json b/package.json index 0df7cd2..5cfc002 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@togethercrew.dev/db", - "version": "3.0.32", + "version": "3.0.33", "description": "All interactions with DB", "main": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/src/interfaces/User.interface.ts b/src/interfaces/User.interface.ts index ff29837..87bfc60 100644 --- a/src/interfaces/User.interface.ts +++ b/src/interfaces/User.interface.ts @@ -6,12 +6,14 @@ export interface IUser { email?: string; communities?: Types.ObjectId[]; tcaAt?: Date; + unverifiedTelegramUsername?: string; } export interface IUserUpdateBody { email?: string; communities?: Types.ObjectId[]; tcaAt?: Date; + unverifiedTelegramUsername?: string; } export interface UserModel extends Model { diff --git a/src/models/schemas/User.schema.ts b/src/models/schemas/User.schema.ts index 7edc8eb..72c4a22 100644 --- a/src/models/schemas/User.schema.ts +++ b/src/models/schemas/User.schema.ts @@ -24,6 +24,9 @@ const userSchema = new Schema( tcaAt: { type: Date, }, + unverifiedTelegramUsername: { + type: String + } }, { timestamps: true }, );