tag

Description

Tag for product.

Mapping of product and tag is stored in item_tag_map.

Definition

Column Type Constraint Description
shop TEXT PRIMARY KEY Shop ID. (shop.username)
id INTEGER Tag ID. (1-origin.)
disabled INTEGER NOT NULL Tag is disabled or not.

Related tables

Query

CREATE TABLE tag(
shop        TEXT,
id          INTEGER,
disabled    INTEGER  NOT NULL,
PRIMARY KEY (shop, id));
      

tag_content

Description

Multilingualized name and description of tag.

Definition

Column Type Constraint Description
shop TEXT PRIMARY KEY Shop ID. (shop.username)
tag_id INTEGER Tag ID. (tag.id)
lang TEXT Language key.
name TEXT NOT NULL Tag name.
description TEXT NOT NULL Tag description.

Query

CREATE TABLE tag_content(
shop        TEXT,
tag_id      INTEGER,
lang        TEXT,
name        TEXT     NOT NULL,
description TEXT     NOT NULL,
PRIMARY KEY(shop, lang, tag_id));