Skip to content

Instantly share code, notes, and snippets.

@kana-sama
Last active September 3, 2016 17:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kana-sama/38f6bee286df7dbe63cc1c3961d404fc to your computer and use it in GitHub Desktop.
Save kana-sama/38f6bee286df7dbe63cc1c3961d404fc to your computer and use it in GitHub Desktop.

Product:

  • id:integer
  • title:string
  • pages:integer
  • cover:image
  • weight:integer
  • price:integer
  • illustrations - модель (это что?)
  • genres - модель (много)
  • series - модель (одна)
  • authors - модель (много) (AuthorProductMap)
  • category - модель (одна)

Category:

  • id:integer
  • name:string

Genre:

  • id:integer
  • name:string

Series:

  • id:integer
  • name:string
  • photo:image
  • description:text

Author:

  • id:integer
  • name:string
  • photo:image
  • description:text

AuthorProductMap:

  • id:integer
  • product_id:integer
  • author_id:integer
  • role:enum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment