Created
July 1, 2016 20:10
-
-
Save lucassmacedo/d3879b06443f256932cbea7f62df2d8a to your computer and use it in GitHub Desktop.
Product/Color/Size
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
products: | |
------------------ | |
| id | name | | |
------------------ | |
| 1 | t-shirt | | |
------------------ | |
variants: | |
------------------------------ | |
| id | product_id | name | | |
------------------------------ | |
| 1 | 1 | size | | |
------------------------------ | |
| 2 | 1 | color | | |
---------------------------- | |
variant_options: | |
--------------------------------------------- | |
| id | product_id | variant_id | name | | |
--------------------------------------------- | |
| 1 | 1 | 1 | small | | |
--------------------------------------------- | |
| 2 | 1 | 1 | large | | |
---------------------------------------------- | |
| 3 | 1 | 2 | red | | |
--------------------------------------------- | |
| 4 | 1 | 2 | blue | | |
---------------------------------------------- | |
skus: | |
----------------------------------------------- | |
| id | product_id | sku | price | qty | | |
------------------------------------------------ | |
| 1 | 1 | 4xx01 | 140 | 5 | | |
------------------------------------------------ | |
| 2 | 1 | 4xx02 | 140 | 10 | | |
------------------------------------------------ | |
| 3 | 1 | 4xx03 | 160 | 8 | | |
------------------------------------------------ | |
| 4 | 1 | 4xx04 | 160 | 15 | | |
sku_values: | |
---------------------------------------------------------------------- | |
| id | product_id | variant_id | variant_option_id | skud_id | | |
----------------------------------------------------------------------- | |
| 1 | 1 | 1 | 1 | 1 | | |
----------------------------------------------------------------------- | |
| 2 | 1 | 2 | 3 | 1 | | |
----------------------------------------------------------------------- | |
| 3 | 1 | 1 | 1 | 2 | | |
----------------------------------------------------------------------- | |
| 4 | 1 | 2 | 4 | 2 | | |
----------------------------------------------------------------------- | |
| 5 | 1 | 1 | 2 | 3 | | |
----------------------------------------------------------------------- | |
| 6 | 1 | 2 | 3 | 3 | | |
----------------------------------------------------------------------- | |
| 7 | 1 | 1 | 2 | 4 | | |
----------------------------------------------------------------------- | |
| 8 | 1 | 2 | 4 | 3 | | |
----------------------------------------------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment