7fife-backend/models/playlist.model.js

17 lines
351 B
JavaScript
Raw Permalink Normal View History

2024-03-07 13:01:44 +00:00
const mongoose = require('mongoose');
const playlistSchema = new mongoose.Schema({
name : {
type : String,
required : true
},
songs : {
type : [mongoose.Schema.Types.ObjectId]
},
userId : {
type : mongoose.Schema.Types.ObjectId
}
})
module.exports = mongoose.model('PlayList',playlistSchema);