IyasuH / Ritmo

https://ritmo-one.vercel.app
0 stars 0 forks source link

CRUD APIs for basic model #1

Closed IyasuH closed 2 months ago

IyasuH commented 5 months ago
IyasuH commented 5 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 }, }], }); }