mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
added Comment
model & schema
This commit is contained in:
parent
83e351f44b
commit
40548b3d88
@ -17,4 +17,6 @@ export const Config = mongoose.model("Config", schemas.Config, "config")
|
||||
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 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: [] },
|
||||
}
|
@ -2,4 +2,5 @@ export { default as User } from "./user"
|
||||
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 Post } from "./post"
|
||||
export { default as Comment } from "./comment"
|
Loading…
x
Reference in New Issue
Block a user