added Playlist db model

This commit is contained in:
srgooglo 2022-11-12 08:57:24 +00:00
parent 502585cd65
commit 2b106771d3
3 changed files with 13 additions and 0 deletions

View File

@ -31,6 +31,9 @@ export const Post = mongoose.model("Post", schemas.Post, "posts")
export const Comment = mongoose.model("Comment", schemas.Comment, "comments") export const Comment = mongoose.model("Comment", schemas.Comment, "comments")
export const SavedPost = mongoose.model("SavedPost", schemas.SavedPost, "savedPosts") export const SavedPost = mongoose.model("SavedPost", schemas.SavedPost, "savedPosts")
// playlists
export const Playlist = mongoose.model("Playlist", schemas.Playlist, "playlists")
// streamings // streamings
export const StreamingKey = mongoose.model("StreamingKey", schemas.StreamingKey, "streamingKeys") export const StreamingKey = mongoose.model("StreamingKey", schemas.StreamingKey, "streamingKeys")
export const StreamingInfo = mongoose.model("StreamingInfo", schemas.StreamingInfo, "streamingInfos") export const StreamingInfo = mongoose.model("StreamingInfo", schemas.StreamingInfo, "streamingInfos")

View File

@ -9,6 +9,8 @@ export { default as Post } from "./post"
export { default as Comment } from "./comment" export { default as Comment } from "./comment"
export { default as SavedPost } from "./savedPost" export { default as SavedPost } from "./savedPost"
export { default as Playlist } from "./playlist"
export { default as UserFollow } from "./userFollow" export { default as UserFollow } from "./userFollow"
export { default as Badge } from "./badge" export { default as Badge } from "./badge"

View File

@ -0,0 +1,8 @@
export default {
user_id: { type: String, required: true },
created_at: { type: Date, default: Date.now, required: true },
title: { type: String, required: true },
description: { type: String },
thumbnail: { type: String },
list: { type: Object, default: [], required: true },
}