Skip to content

Instantly share code, notes, and snippets.

@royib
Created January 19, 2022 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save royib/712051e56970d0555ab33346592eec27 to your computer and use it in GitHub Desktop.
Save royib/712051e56970d0555ab33346592eec27 to your computer and use it in GitHub Desktop.
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
export type AuthorDocument = Author & Document;
@Schema()
export class Author {
@Prop()
firstName: string;
@Prop()
lastName: string;
}
export const AuthorSchema = SchemaFactory.createForClass(Author);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment