|
@@ -1,12 +1,12 @@
|
|
|
export default {
|
|
|
youtubeId: { type: String, min: 11, max: 11, required: true, index: true, unique: true },
|
|
|
- title: { type: String, required: true },
|
|
|
- artists: [{ type: String, default: [] }],
|
|
|
- genres: [{ type: String, default: [] }],
|
|
|
- tags: [{ type: String, default: [] }],
|
|
|
+ title: { type: String, trim: true, required: true },
|
|
|
+ artists: [{ type: String, trim: true, default: [] }],
|
|
|
+ genres: [{ type: String, trim: true, default: [] }],
|
|
|
+ tags: [{ type: String, trim: true, default: [] }],
|
|
|
duration: { type: Number, min: 1, required: true },
|
|
|
skipDuration: { type: Number, required: true, default: 0 },
|
|
|
- thumbnail: { type: String },
|
|
|
+ thumbnail: { type: String, trim: true },
|
|
|
likes: { type: Number, default: 0, required: true },
|
|
|
dislikes: { type: Number, default: 0, required: true },
|
|
|
explicit: { type: Boolean },
|