newton-migosi / mdn-local-library-tutorial

MIT License
1 stars 0 forks source link

db schema #9

Open newton-migosi opened 1 year ago

newton-migosi commented 1 year ago

add tables for library entries

const authorSchema = Schema({
  name: String,
  stories: [{ type: Schema.Types.ObjectId, ref: "Story" }],
});

const storySchema = Schema({
  author: { type: Schema.Types.ObjectId, ref: "Author" },
  title: String,
});
newton-migosi commented 1 year ago

https://www.yesodweb.com/book/persistent