nestjs-starter
Version:
Get started for beginners with Nestjs
18 lines (13 loc) • 333 B
text/typescript
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { Document } from 'mongoose';
export type CatDocument = Cat & Document;
()
export class Cat {
()
name: string;
()
age: number;
()
breed: string;
}
export const CatSchema = SchemaFactory.createForClass(Cat);