option_group

Description

Group of options.

Definition

Column Type Constraint Description
shop TEXT PRIMARY KEY Shop ID. (shop.username)
id INTEGER Identifier.
selection INTEGER NOT NULL Selection method of group.
  • 0: Single selection
  • 1: Multiple selection
atleast INTEGER NOT NULL

Least number of option that a customer must choose to buy a product which is associated with this group. If Single selection is specified, this column must be 0 or 1.

Related tables

Query

CREATE TABLE option_group(
shop      TEXT,
id        INTEGER,
selection INTEGER NOT NULL,
atleast   INTEGER NOT NULL,
PRIMARY KEY(shop, id)
);

option_group_content

Description

Multilingualized name of option_group.

Definition

Column Type Constraint Description
shop TEXT PRIMARY KEY Shop ID. (shop.username)
group_id INTEGER Group ID. (option_group.id)
lang TEXT Language key.
name TEXT NOT NULL Group name.

Query

CREATE TABLE option_group_content(
shop      TEXT,
lang      TEXT,
group_id  INTEGER,
name      TEXT    NOT NULL,
PRIMARY KEY(shop, lang, group_id)
);