npm workspaces
moved bot to apps/bot
This commit is contained in:
@@ -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 },
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user