Closed IyasuH closed 2 months ago
basic model_fields{ ArtistSchema = new mongoose.Schema({ artist_id: String full_name: String, bio: String, dob: Date, gender: String, img_url: String, created_at: { type: Date, default: Date.now }, updated_at: { type: Date, default: Date.now }, albums: [{ artist_id: String album_id: string title: String, release_date: Date, cover_img_url: String, songs: [{ artist_id: String album_id: string song_id: string title: String, duration: Number, file_url: String, release_date: Date, genre: String, created_at: { type: Date, default: Date.now }, updated_at: { type: Date, default: Date.now }, }], }], single_songs: [{ artist_id: String song_id: string title: String, duration: Number, file_url: String, release_date: Date, genre: String, created_at: { type: Date, default: Date.now }, updated_at: { type: Date, default: Date.now }, }], }); }