@arsendoman/book-publisher-store
Version:
A Nest.js package for book publishing and storing
22 lines (18 loc) • 765 B
text/typescript
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { BaseSchema } from './base.schema';
import { CommentComplainsEnum } from '../../../core/enums/comment.complains.enum';
import mongoose from 'mongoose';
export type CommentComplianceDocument = CommentCompliance & Document;
()
export class CommentCompliance extends BaseSchema {
({ type: [mongoose.Schema.Types.ObjectId], ref: 'Book' })
bookId: string;
({ type: [mongoose.Schema.Types.ObjectId], ref: 'BookComment' })
commentId: string;
({ type: [mongoose.Schema.Types.ObjectId], ref: 'Profile' })
userId: string;
()
complianceReason: CommentComplainsEnum;
}
export const CommentComplianceSchema =
SchemaFactory.createForClass(CommentCompliance);