stufflog graphql server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
481 B

  1. package models
  2. type Item struct {
  3. ID string `db:"item_id"`
  4. Name string `db:"name"`
  5. Description string `db:"description"`
  6. Tags []string `db:"tags"`
  7. QuantityUnit *string `db:"quantity_unit"`
  8. ImageURL *string `db:"image_url"`
  9. }
  10. type ItemFilter struct {
  11. ItemIDs []string
  12. Tags []string
  13. }
  14. /*
  15. SELECT i.item_id, i.name FROM item i
  16. LEFT JOIN tag AS t ON t.item_id = i.item_id
  17. WHERE t.tag_name IN ("Groceries")
  18. GROUP by i.item_id;
  19. */