- 1. Role use case diagram
Administrator Role Use Case Diagram
Administrator use case: By logging in to the account managed by the cloud development background, the merchant can directly manage the ordering system of the store, operate a series of data in the store, and facilitate the merchant to update and maintain the store's products.
User Role Use Case Diagram
By logging into the account managed by the cloud development background, merchants can directly manage the ordering system of the store and operate a series of data in the store, which is convenient for the merchant to update and maintain the store.
- Users can log in to the mini program platform and enter the homepage of the ordering platform.
- Users can place orders for commodities on the mini-program interface.
- Users can place orders in advance on the ordering page.
- Users can change my information on my interface and query information about orders.
- Admins review and process orders.
- Admins can add or remove items.
Overall program logic flow chart
User order data flow diagram
The user places an order through the mini program ordering platform, and the mini program will submit the selected product type to the shopping cart, and provide information such as the type and quantity of the dish ordered by the user to the background management.
Background data flow diagram
Data Dictionary:
Data item entry: User data item is the main body of the program order process, and each user is uniquely identified by ID; administrator data item is the main body that manages the entire system, and all relevant data can be managed through account login.
Data structure entry: In the program order transaction process, there are the following 4 data structure items, which are the component modules that make up the ordering system and realize the basic functions of the ordering program.
Functional module diagram of the ordering applet
Database Design
ER diagram design:
1. User entity ER diagram
2. Product entity ER diagram
3. Administrator entity ER diagram
4. Order ER diagram
5. Comment on ER Diagram
6. Shopping cart ER diagram
7. Store entity ER diagram
8. Table ER Diagram
9. Overall ER Diagram
Database logical design and physical implementation
The database is an important part of the program project. During the development of this mini program platform, the database is used as a tool for storing data, storing important information such as stores, orders, and dishes. In the page display, through the test of each page of the system, it conforms to the operation interaction of the conventional management system. [7] This program system draws on other excellent data structure designs, and after repeated revisions and verifications, the logic design of the database is reasonable and clear.
Logic design should pay attention to the following points:
1. The main objects of each module established.
2. When drawing a table, design the column name and data type of the table, judge whether it is not empty, and describe the data.
3. Design the primary key and foreign key of the table.
According to the above points, the created role table is as follows:
1. The user table is mainly to save the information of the user on the ordering platform. The table number is the primary key, and this table also contains table numbers, order comments, shopping carts, order information, order records, etc.
Table 3.1 User Table
column name |
type of data |
constraint |
describe |
Remark |
varchar (10) |
non empty |
User ID |
primary key |
|
COMMENT |
varchar (20) |
null |
order review |
foreign key |
SHOPPING |
varchar (20) |
null |
shopping cart |
foreign key |
ORDER_MESSAGE |
varchar (11) |
null |
order information |
foreign key |
ORDER_RECORD |
varchar (50) |
null |
order record |
2. The product table is where the product information of the Mini Program platform is stored. The name of the product is the primary key. It also lists the product category, price, picture, and sales quantity, and is associated with other main role tables through product classification.
Table 3.2 Commodity Table
column name |
type of data |
constraint |
describe |
Remark |
GOODS_ID |
int (10) |
non empty |
Product Number |
primary key |
GOODS_TITLE |
varchar (50) |
non empty |
Categories |
foreign key |
GOODS_PRICE |
double |
non empty |
commodity price |
|
GOODS_IMAGE |
varchar (10) |
non empty |
product picture |
|
GOODS_BOLG |
varchar (100) |
non empty |
Sales volume |
3. The administrator table is used to save information about merchants' operations on the Mini Program platform. These include login account, login password, order management, commodity management, and table number management.
Table 3.3 Administrator table
column name |
type of data |
constraint |
describe |
Remark |
|
varchar(20) |
non empty |
Admin ID |
primary key |
||
ADMIN_NUMBER |
int (20) |
non empty |
login account |
||
ADMIN_PAD |
int (20) |
non empty |
login password |
||
ORDER_MANAGE |
varchar (100) |
null |
order management |
foreign key |
|
GOODS_MANAGE |
varchar (100) |
non empty |
commodity management |
foreign key |
|
STORE_MANAGE |
int (1) |
non empty |
store management |
foreign key |
|
TABLE_MANAGE |
int (20) |
non empty |
table management |
foreign key |
4. The order form is mainly to describe the generated commodity order entity after the user places an order and pays in the shopping cart.
Table 3.4 Order Table
column name |
type of data |
constraint |
describe |
Remark |
ORDER_ID |
varchar (20) |
non empty |
order number |
primary key |
GOODS_NAME |
varchar (20) |
non empty |
product name |
foreign key |
ORDER_TIME |
varchar (30) |
non empty |
order time |
|
GOODS_MESSAGE |
varchar (11) |
non empty |
commodity price |
5. The comment form is mainly an entity for users to comment on completed orders.
Table 3.5 Comment Form
column name |
type of data |
constraint |
describe |
Remark |
COMMENT_ID |
varchar (20) |
non empty |
comment id |
primary key |
COMMENT_TIME |
number (20) |
non empty |
comment time |
|
COMMENT_TEXT |
varchar (30) |
non empty |
comments |
|
ORDER_MESSAGE |
varchar (11) |
non empty |
order number |
foreign key |
6. The shopping cart table is mainly to save the product information ordered by the user on the ordering platform, and submit it to the background after the user pays.
Table 3.6 Shopping cart table
column name |
type of data |
constraint |
describe |
Remark |
SHOPCART_ID |
varchar (20) |
non empty |
cart number |
primary key |
GOODS_SORT |
varchar (20) |
non empty |
Commodity category |
foreign key |
GOODS_PRICE |
varchar (30) |
non empty |
commodity price |
|
GOODS_AMOUNT |
varchar (11) |
non empty |
Number of Products |
7. The store table is the administrator's update and modification of the name, address, logo and other related information of the store's applet .
Table 3.7 Store table
column name |
type of data |
constraint |
describe |
Remark |
STORE_ID |
varchar (20) |
non empty |
Store ID |
primary key |
STORE_ADDRESS |
varchar (20) |
non empty |
shop address |
foreign key |
STORE_LOGO |
varchar (10) |
non empty |
store logo |
|
STORE_PHONE |
number (11) |
non empty |
business phone |
|
STORE_WECHAT |
varchar (10) |
non empty |
Merchant WeChat |
8. The dining table table is the physical table that the store provides users with meals in the store, which is used to distinguish users and avoid errors when uploading products .
Table 3.8 Dining table
column name |
type of data |
constraint |
describe |
Remark |
TABLE_ID |
int (10) |
non empty |
table number |
primary key |
CODE |
varchar (20) |
non empty |
QR code |
foreign key |
TABLE_AMOUNT |
varchar (30) |
non empty |
number of tables |
9. The product classification table is a list of products classified by type when the store products are displayed at the front desk, so that users can query the products they need.
Table 3.9 Commodity Classification Table
column name |
type of data |
constraint |
describe |
Remark |
SORT_ID |
int (10) |
non empty |
Product Category ID |
primary key |
GOODS_ID |
varchar (20) |
non empty |
product name |
foreign key |
GOODS_PRICE |
varchar (30) |
non empty |
commodity price |
|
GOODS_IMAGE |
varchar (30) |
non empty |
product picture |
10. The two-dimensional code table is for users to indicate their table when placing an order, so as to ensure that the merchant can process the corresponding order accurately.
Table 3.10 QR Code Table
column name |
type of data |
constraint |
describe |
Remark |
CODE_ID |
int (10) |
non empty |
QR code number |
primary key |
TABLE_ID |
int (10) |
non empty |
table number |
foreign key |
programming
1. User login module flow chart
2. Flow chart of the order module
3. Flowchart of product information search module
4. Flowchart of the administrator management module
5. Flow chart of user comment module
6. Map calling module
To be continued, follow-up update