npm workspaces

moved bot to apps/bot
This commit is contained in:
Anton
2024-02-03 14:52:17 +03:00
parent 7309a34319
commit f0ddeb05b6
16 changed files with 14888 additions and 164 deletions
+23
View File
@@ -0,0 +1,23 @@
import mongoose from 'mongoose';
export type IUser = {
id: number;
username: string | undefined;
firstName: string;
lastName: string | undefined;
isBot: boolean;
isPremium: boolean;
role: string; // 'member' | 'administrator' | 'creator';
}
export const UserSchema = new mongoose.Schema<IUser>(
{
id: { type: Number, required: true },
username: { type: String, required: true },
firstName: { type: String },
lastName: { type: String },
isBot: { type: Boolean, required: true },
isPremium: { type: Boolean, required: true },
role: { type: String, required: true },
}
);