src/users/schemas/user-settings.schema.ts
Properties |
| _id |
Type : string
|
|
Defined in src/users/schemas/user-settings.schema.ts:15
|
| columns |
Type : Record<string, >[]
|
Decorators :
@ApiProperty({type: undefined, default: undefined, description: 'Array of the users preferred columns in dataset table'})
|
|
Defined in src/users/schemas/user-settings.schema.ts:25
|
| datasetCount |
Type : number
|
Decorators :
@ApiProperty({type: Number, default: 25, description: 'The users preferred number of datasets to view per page'})
|
|
Defined in src/users/schemas/user-settings.schema.ts:33
|
| Optional id |
Type : string
|
|
Defined in src/users/schemas/user-settings.schema.ts:17
|
| jobCount |
Type : number
|
Decorators :
@ApiProperty({type: Number, default: 25, description: 'The users preferred number of jobs to view per page'})
|
|
Defined in src/users/schemas/user-settings.schema.ts:41
|
| userId |
Type : string
|
Decorators :
@ApiProperty({type: String, required: true})
|
|
Defined in src/users/schemas/user-settings.schema.ts:45
|
import * as mongoose from "mongoose";
import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose";
import { ApiProperty } from "@nestjs/swagger";
import { Document } from "mongoose";
export type UserSettingsDocument = UserSettings & Document;
@Schema({
collection: "UserSetting",
toJSON: {
getters: true,
},
})
export class UserSettings {
_id: string;
id?: string;
@ApiProperty({
type: [Object],
default: [],
description: "Array of the users preferred columns in dataset table",
})
@Prop({ type: [Object], default: [] })
columns: Record<string, unknown>[];
@ApiProperty({
type: Number,
default: 25,
description: "The users preferred number of datasets to view per page",
})
@Prop({ type: Number, default: 25 })
datasetCount: number;
@ApiProperty({
type: Number,
default: 25,
description: "The users preferred number of jobs to view per page",
})
@Prop({ type: Number, default: 25 })
jobCount: number;
@ApiProperty({ type: String, required: true })
@Prop({ type: mongoose.Schema.Types.ObjectId, ref: "User", required: true })
userId: string;
}
export const UserSettingsSchema = SchemaFactory.createForClass(UserSettings);