@arsendoman/book-publisher-store
Version:
A Nest.js package for book publishing and storing
23 lines (19 loc) • 663 B
text/typescript
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { BaseSchema } from './base.schema';
import { Profile } from './profile.schema';
import mongoose from 'mongoose';
export type BookCommentDocument = BookComment & Document;
()
export class BookComment extends BaseSchema {
()
bookId: string;
()
username: string;
()
text: string;
({ type: [mongoose.Schema.Types.ObjectId], ref: 'Profile' })
likeInteractions: string[];
({ type: [mongoose.Schema.Types.ObjectId], ref: 'Profile' })
dislikeInteractions: string[];
}
export const BookCommentSchema = SchemaFactory.createForClass(BookComment);