forked from dbroqua/MusicTopus
Some changes in structure + add album
This commit is contained in:
parent
3ebdc9c06a
commit
f08e70eb7c
36 changed files with 883 additions and 165 deletions
36
src/models/albums.js
Normal file
36
src/models/albums.js
Normal file
|
@ -0,0 +1,36 @@
|
|||
import mongoose from "mongoose";
|
||||
|
||||
const { Schema } = mongoose;
|
||||
|
||||
const AlbumSchema = new mongoose.Schema(
|
||||
{
|
||||
User: {
|
||||
type: Schema.Types.ObjectId,
|
||||
ref: "Users",
|
||||
},
|
||||
discogsId: Number,
|
||||
year: Number,
|
||||
released: Date,
|
||||
uri: String,
|
||||
artists: Array,
|
||||
artists_sort: String,
|
||||
labels: Array,
|
||||
series: Array,
|
||||
companies: Array,
|
||||
formats: Array,
|
||||
title: String,
|
||||
country: String,
|
||||
notes: String,
|
||||
identifiers: Array,
|
||||
videos: Array,
|
||||
genres: Array,
|
||||
styles: Array,
|
||||
tracklist: Array,
|
||||
extraartists: Array,
|
||||
images: Array,
|
||||
thumb: String,
|
||||
},
|
||||
{ timestamps: true }
|
||||
);
|
||||
|
||||
export default mongoose.model("Albums", AlbumSchema);
|
Loading…
Add table
Add a link
Reference in a new issue