mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-28 05:14:08 +01:00
🔧 refactor: Update Group Schema to use TypeScript and import from data-schemas
This commit is contained in:
parent
2fd04b6d65
commit
4448c13684
4 changed files with 47 additions and 43 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { Schema, Document } from 'mongoose';
|
||||
import { Schema, Document, Types } from 'mongoose';
|
||||
import { SystemRoles } from 'librechat-data-provider';
|
||||
|
||||
export interface IUser extends Document {
|
||||
|
|
@ -18,6 +18,7 @@ export interface IUser extends Document {
|
|||
discordId?: string;
|
||||
appleId?: string;
|
||||
plugins?: unknown[];
|
||||
groups?: Types.ObjectId[];
|
||||
twoFactorEnabled?: boolean;
|
||||
totpSecret?: string;
|
||||
backupCodes?: Array<{
|
||||
|
|
@ -135,6 +136,11 @@ const User = new Schema<IUser>(
|
|||
plugins: {
|
||||
type: Array,
|
||||
},
|
||||
groups: {
|
||||
type: [Schema.Types.ObjectId],
|
||||
ref: 'Group',
|
||||
default: [],
|
||||
},
|
||||
twoFactorEnabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue