/progweb

Progetto ProxyFarmer, Java servlet e-commerce per Corso Programmazione Web

Primary LanguageJava

Progetto di Programmazione WEB e Programmazione 2 in JAVA


Il progetto simula un semplice ecommerce agricolo con pagine e funzioni per un ipotetico buyer e seller.
Le tecnologie usate sono TOMCAT, java EE , apache Derby.

Il sistema utilizza i pattern di servlet, filtri e listener.

#Ciclo utente Buyer
Login
->Landing Page
	->Product Page by category
		->Confirm Order
	->Logout

#Ciclo utente seller
Login
->Landing Page
	->Add Product
	->Check Order
	->Logout



DB

USERS (
id INT  NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1,
INCREMENT BY 1),
username VARCHAR(100) NOT NULL,
password VARCHAR(100) NOT NULL,
role VARCHAR(200) NOT NULL,
CONSTRAINT pk_users PRIMARY KEY (id)
)

CATEGORY (
id INT  NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1,
INCREMENT BY 1),
name VARCHAR(100) NOT NULL,
CONSTRAINT pk_category PRIMARY KEY (id)
)

PRODUCTS (
id INT  NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1,
INCREMENT BY 1),
name VARCHAR(100) NOT NULL,
seller_id INT NOT NULL,
category_id INT NOT NULL,
quantity INT NOT NULL,
UM VARCHAR(100) NOT NULL,
price DOUBLE NOT NULL,
date_timeinsert DATE NOT NULL,
url_image VARCHAR(255),
CONSTRAINT pk_products PRIMARY KEY (id),
CONSTRAINT fk_category FOREIGN KEY (category_id) REFERENCES CATEGORY(id)
)


ORDERS (
id INT  NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1,
INCREMENT BY 1),
date_timestamp DATE NOT NULL,
product_id INT NOT NULL,
buyer_id INT NOT NULL,
quantity INT NOT NULL,
total_price DOUBLE NOT NULL,
url_receipt VARCHAR(255) NOT NULL,
CONSTRAINT pk_orders PRIMARY KEY (id),
CONSTRAINT fk_product FOREIGN KEY (product_id) REFERENCES PRODUCTS(id),
CONSTRAINT fk_buyer FOREIGN KEY (buyer_id) REFERENCES USERS(id)
)