stationHistory.js 788 B

12345678910111213141516171819202122
  1. import mongoose from "mongoose";
  2. export default {
  3. stationId: { type: mongoose.Schema.Types.ObjectId, required: true },
  4. type: { type: String, enum: ["song_played"], required: true },
  5. payload: {
  6. song: {
  7. _id: { type: mongoose.Schema.Types.ObjectId },
  8. mediaSource: { type: String, min: 11, max: 11, required: true },
  9. title: { type: String, trim: true, required: true },
  10. artists: [{ type: String, trim: true, default: [] }],
  11. duration: { type: Number },
  12. thumbnail: { type: String },
  13. requestedBy: { type: String },
  14. requestedAt: { type: Date },
  15. verified: { type: Boolean }
  16. },
  17. skippedAt: { type: Date },
  18. skipReason: { type: String, enum: ["natural", "force_skip", "vote_skip", "other"] }
  19. },
  20. documentVersion: { type: Number, default: 2, required: true }
  21. };