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