Created
September 29, 2020 13:25
-
-
Save talesmgodois/8e96e31fba94fb81bd7d5a5fcc1fe865 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose'; | |
import { Document } from 'mongoose'; | |
export type CatDocument = Cat & Document; | |
@Schema() | |
export class Cat { | |
@Prop() | |
name: string; | |
@Prop() | |
age: number; | |
@Prop() | |
breed: string; | |
} | |
export const CatSchema = SchemaFactory.createForClass(Cat); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment