Database

E-commerce Site

The database in the E-commerce site has to have its own tables plus some additional ones required to run the Oauth module. In summary, the minimum set of tables required is the following:

Users

Field Type Null Predetermined Comments
id int(11) No Auto numeric. Primary key
name varchar(255) No
surname varchar(255) No
user varchar(255) No
password varchar(255) No
... other data Other data relevant for the user like address, email, phone, etc.

Projects

Field Type Null Predetermined Comments
id int(11) No Auto numeric. Primary key
project_name varchar(255) No
width varchar(255) No
height varchar(255) No
user_id int(11) No Foreign key, related to the user table
scene (1...n) varchar(255) No Each of the background images (escenas)
element (1...n) varchar(255) No Each of the vector objects to place on top of the background (elementos)
price float(0.00) No Base price for square meter
content_context_token varchar(255) No Unique identifier to pass to designer by GET
folder_project varchar(255) No Project folder
format varchar(255) No Format of the project SKU (WP | WA | CV)
status varchar(255) No Status of the project in designer (EDITING | IN_CART | PURCHASED | DELETED)

Orders

Field Type Null Predetermined Comments
id int(11) No Auto numeric. Primary key
date date(0000-00-00) No Date of ordering
project_id int(11) No Foreign key. Identifier for the project.
user_id int(11) No Foreign key. Identifier for the user.
price double(0.00) No Final price for the project.
... other data Other data relevant for the order like date to be delivered, transport details, discounts, etc.