added addresses endpoints

This commit is contained in:
Daniel Goc
2026-04-09 12:21:56 +02:00
parent 75997ab15b
commit 1083ab7a61
17 changed files with 684 additions and 15 deletions

View File

@@ -210,6 +210,18 @@ ON `b2b_countries` (
`ps_id_country` ASC
);
-- addresses
CREATE TABLE IF NOT EXISTS b2b_addresses (
id BIGINT UNSIGNED AUTO_INCREMENT NOT NULL,
b2b_customer_id BIGINT UNSIGNED NOT NULL,
address_info TEXT NOT NULL,
b2b_country_id BIGINT UNSIGNED NOT NULL,
PRIMARY KEY (id),
CONSTRAINT fk_b2b_addresses_b2b_customers FOREIGN KEY (b2b_customer_id) REFERENCES b2b_customers (id) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT fk_b2b_addresses_b2b_countries FOREIGN KEY (b2b_country_id) REFERENCES b2b_countries (id) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB;
CREATE TABLE b2b_specific_price (
id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(255) NOT NULL,