import mongoose , { Model , Schema } from "mongoose" ; import ThreadDocument from "./ThreadDocument" ; export const articleSchema = new mongoose . Schema ( { author : String , title : String , content : String , likes : [ String ] , commentsCount : Number , lastCommentedAt : String , lastCommentedBy : String , removedEternally : Boolean , } , { timestamps : true } ) ; const ThreadCollection = mongoose . model ( "Thread" , articleSchema ) ; export default ThreadCollection ;