####Quary for create database
create database dcoms_db;
use dcoms_db;
create table users(id int(20) unsigned auto_increment primary key not null, name varchar(255) not null, username varchar(255) not null, email varchar(255) null, u_password varchar(255) not null, role int(255) null);
insert into users (name, username, u_password, role) values ('admin', 'admin', 'admin', 0);
create table food(id int(20) unsigned auto_increment primary key not null, fname varchar(255) not null, price varchar(10) not null, category varchar(50) not null);
create table orders(id int(20) unsigned auto_increment primary key not null, customer_id int(20), timestamp timestamp not null default current_timestamp on update current_timestamp, address varchar(500), status varchar(10) default 'pending');
create table order_items(id int(20) unsigned auto_increment primary key not null,order_id int(20) not null, food_id int(20) not null, quantity int(20) default 1);
####completed parts
Signup
admin::
- view foods
- view orders
- view a order
- update order status
user::
- view food menu
- add item to the order (ctrl+select items and then press the button )
- view my order
- edit quantity from order (click the cell and enter new value and press enter)
- Calculate total of the ordre items
- add order (press confirm order button)
- view specific order from my orders
- delete selected order