This commit is contained in:
Tiavina 2025-02-21 10:16:33 +03:00
parent 26ab3baffb
commit f6240a7554
2 changed files with 23 additions and 1 deletions

View File

@ -25,9 +25,17 @@ CREATE TABLE IF NOT EXISTS oc_gestion_orders(
);
CREATE TABLE IF NOT EXISTS oc_gestion_order_product(
id INT AUTO_INCREMENT PRIMARY KEY,
reference VARCHAR(255) DEFAULT '',
label VARCHAR(255) DEFAULT '',
ht_amount FLOAT NOT NULL DEFAULT 0,
id_nextcloud VARCHAR(100)
);
CREATE TABLE IF NOT EXISTS oc_gestion_order_item(
id INT AUTO_INCREMENT PRIMARY KEY,
fk_order_id INT NOT NULL,
fk_product_id INT NOT NULL,
fk_order_item_id INT NOT NULL,
quantity INT NOT NULL,
id_nextcloud VARCHAR(100)
);

View File

@ -0,0 +1,14 @@
create table oc_gestion_order_type (
order_type_key VARCHAR(255) PRIMARY KEY NOT NULL,
order_type_label VARCHAR(255) DEFAULT ''
);
insert into oc_gestion_order_type(order_type_key,order_type_label) VALUES
('DEVIS','Devis commande'),
('PURCHASE','Achat de produit');
alter table oc_gestion_orders
add column fk_order_type_key VARCHAR(255) NOT NULL DEFAULT 'DEVIS';
alter table oc_gestion_orders
add column fk_devis_id INT DEFAULT NULL;