song.js 715 B

12345678910111213141516
  1. module.exports = {
  2. songId: { type: String, min: 11, max: 11, required: true, index: true },
  3. title: { type: String, required: true },
  4. artists: [{ type: String }],
  5. genres: [{ type: String }],
  6. duration: { type: Number, required: true },
  7. skipDuration: { type: Number, required: true },
  8. thumbnail: { type: String, required: true },
  9. likes: { type: Number, default: 0, required: true },
  10. dislikes: { type: Number, default: 0, required: true },
  11. explicit: { type: Boolean, default: false, required: true },
  12. requestedBy: { type: String, required: true },
  13. requestedAt: { type: Date, required: true },
  14. acceptedBy: { type: String, required: true },
  15. acceptedAt: { type: Date, default: Date.now(), required: true }
  16. };