mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-09 23:48:36 +01:00
fix schema
This commit is contained in:
@@ -2,11 +2,13 @@ import { model, Schema, Types } from 'mongoose';
|
|||||||
|
|
||||||
export type TUserSettings = {
|
export type TUserSettings = {
|
||||||
user_id: Schema.Types.ObjectId,
|
user_id: Schema.Types.ObjectId,
|
||||||
|
max_projects: number,
|
||||||
active_project_id: Schema.Types.ObjectId
|
active_project_id: Schema.Types.ObjectId
|
||||||
}
|
}
|
||||||
|
|
||||||
const UserSettingsSchema = new Schema<TUserSettings>({
|
const UserSettingsSchema = new Schema<TUserSettings>({
|
||||||
user_id: { type: Types.ObjectId, unique: true, index: 1 },
|
user_id: { type: Types.ObjectId, unique: true, index: 1 },
|
||||||
|
max_projects: { type: Number, default: 3 },
|
||||||
active_project_id: Schema.Types.ObjectId,
|
active_project_id: Schema.Types.ObjectId,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user