2022-07-01 22:27:19 +00:00
|
|
|
import { Schema, Prop, SchemaFactory } from '@nestjs/mongoose';
|
|
|
|
import { Document, ObjectId } from 'mongoose';
|
|
|
|
|
|
|
|
export type CommentDocument = Comment & Document;
|
|
|
|
|
|
|
|
@Schema({ collection: 'comments' })
|
|
|
|
export class Comment {
|
2022-07-25 04:38:48 +00:00
|
|
|
@Prop()
|
|
|
|
comment: string;
|
2022-07-01 22:27:19 +00:00
|
|
|
|
2022-07-25 04:38:48 +00:00
|
|
|
@Prop()
|
|
|
|
date_entry: Date;
|
2022-07-01 22:27:19 +00:00
|
|
|
|
2022-07-25 04:38:48 +00:00
|
|
|
@Prop()
|
|
|
|
user_id: string;
|
2022-07-01 22:27:19 +00:00
|
|
|
|
2022-07-25 04:38:48 +00:00
|
|
|
@Prop()
|
|
|
|
post_id: string;
|
2022-07-01 22:27:19 +00:00
|
|
|
}
|
|
|
|
|
2022-07-25 04:38:48 +00:00
|
|
|
export const CommentSchema = SchemaFactory.createForClass(Comment);
|