File

src/users/schemas/user-profile.schema.ts

Index

Properties

Properties

accessGroups
Type : string[]
Decorators :
@Prop({type: undefined})
Optional displayName
Type : string
Decorators :
@Prop()
email
Type : string
Decorators :
@Prop()
Optional emails
Type : Record<string, string>[]
Decorators :
@Prop({type: undefined})
Optional id
Type : string
Decorators :
@Prop()
Optional thumbnailPhoto
Type : string
Decorators :
@Prop()
username
Type : string
Decorators :
@Prop()
import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose";
import { Document } from "mongoose";

export type UserProfileDocument = UserProfile & Document;

@Schema()
export class UserProfile {
  @Prop()
  displayName?: string;

  @Prop()
  email: string;

  @Prop()
  username: string;

  @Prop()
  thumbnailPhoto?: string;

  @Prop()
  id?: string;

  @Prop({ type: [Object] })
  emails?: Record<string, string>[];

  @Prop({ type: [String] })
  accessGroups: string[];
}

export const UserProfileSchema = SchemaFactory.createForClass(UserProfile);

results matching ""

    No results matching ""