Add categories

This commit is contained in:
Niklas Fondberg
2021-07-07 13:17:39 +02:00
parent f66dbe33d7
commit 7140ecf26b
2 changed files with 46 additions and 0 deletions
+18
View File
@@ -57,4 +57,22 @@ WHERE product_category.product_id = ?
}; };
}); });
} }
<<<<<<< Updated upstream
=======
/**
* category keywords
*
SELECT category_keyword.category_id, keywords.value
FROM category_keyword
JOIN keywords ON category_keyword.keyword_id = keywords.id;
FROM categorydata cd
JOIN categorydatakeys cdk ON cd.datakey_id = cdk.id
*
*/
>>>>>>> Stashed changes
} }
+28
View File
@@ -81,3 +81,31 @@ export class ProductAPI extends SQLDataSource {
.then((data) => data.rows.map((row) => this.createProductFromRow(row))); .then((data) => data.rows.map((row) => this.createProductFromRow(row)));
} }
} }
/**
*
* SELECT product_keyword.product_id, keywords.value
FROM product_keyword
JOIN keywords ON product_keyword.keyword_id = keywords.id;
*
keywords
id, value
keyword_type:
keyword_id, type_id
keywordstypes
id, name (color)
keywords_i18n NOT used it seems and misses some languages
*/