mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +00:00
added Comment
model & schema
This commit is contained in:
parent
1fbaef76a9
commit
446813f51e
@ -18,3 +18,5 @@ export const User = mongoose.model("User", schemas.User, "accounts")
|
||||
export const Session = mongoose.model("Session", schemas.Session, "sessions")
|
||||
export const Role = mongoose.model("Role", schemas.Role, "roles")
|
||||
export const Post = mongoose.model("Post", schemas.Post, "posts")
|
||||
export const Comment = mongoose.model("Comment", schemas.Comment, "comments")
|
||||
//export const Tag = mongoose.model("Tag", schemas.Tag, "tags")
|
6
packages/server/src/schemas/comment/index.js
Normal file
6
packages/server/src/schemas/comment/index.js
Normal file
@ -0,0 +1,6 @@
|
||||
export default {
|
||||
user_id: { type: String, required: true },
|
||||
content: { type: String, required: true },
|
||||
created_at: { type: Date, default: Date.now },
|
||||
liked: { type: Array, default: [] },
|
||||
}
|
@ -3,3 +3,4 @@ export { default as Role } from "./role"
|
||||
export { default as Session } from "./session"
|
||||
export { default as Config } from "./config"
|
||||
export { default as Post } from "./post"
|
||||
export { default as Comment } from "./comment"
|
Loading…
x
Reference in New Issue
Block a user