• Tidak ada hasil yang ditemukan

The figure below is the entity-relationship diagram of the Localized E-Commerce Application for UP Manila (LEAf-UPM).

Figure 16: Entity Relationship Diagram

The following tables describe the columns of each tables in the entity-relationship diagram (ERD) of the Localized E-Commerce Application for UP Manila (LEAf- UPM)

Table 1: users table

Attribute Data Type Description

id int(11) unique id of the user

username varchar(20) unique username of the user password varchar(8) password of the user

isAdmin int(1) determines if the user is an admin isDisabled int(1) determines if the user account is disabled

isInd int(1) determines if the user is an individual dateApproved datetime date and time the user account has been approved

credibility float credibility score of the user name varchar(80) full name of the user

upmid varchar(10) UPM ID of the user (ie student number) college varchar(20) college where the user belongs

email varchar(50) email address of the user contactNum varchar(20) contact number of the user

image varchar(20) filename of the user’s profile picture

Table 2: product advertised table

Attribute Data Type Description

id int(11) unique id of the product

userid int(11) id of the seller of the product

prodcatid int(11) id of the product category where the product belongs

name varchar(50) name of the product

quantity int(11) quantity of the product

price float price of the product

isTrad int(1) determines if the product can be traded for other products description varchar(255) brief description of the product

dateAdv datetime date and time the product has been advertised image varchar(20) filename of the image of the product isActive varchar(3) determines whether a product is active or not

Table 3: product category table Attribute Data Type Description

id int(11) unique id of the product category

name varchar(20) name of the product category

Table 4: product transaction table

Attribute Data Type Description

id int(11) unique id of the product transaction product id int(11) id of the product sold

buyer id int(11) id of buyer of the product sold seller id int(11) id of the seller of the product sold dateTransaction datetime date and time of the product transaction

quantity int(11) quantity of the product sold

transaction type varchar(10) type of transaction; whether REGULAR or TRADE trade id int(11) id of the traded product

status varchar(20) current status of the transaction (PAID or UNPAID) rating int(11s) score of the transaction for user’s credibility

Table 5: product request table

Attribute Data Type Description

id int(11) unique id of the requested product

userid int(11) id of the seller

date request datetime date and time the product has been requested name varchar(30) name of the user requesting

email varchar(30) email of user requesting

contactNum varchar(20) contact number of the user requesting prodName varchar(30) name of the product request

prodCat varchar(15) category of the product request prod description varchar(200) description of the product request

image varchar(20) filename of the image of the product request Table 6: notifications table

Attribute Data Type Description

id int(11) unique id of the notification

userid int(11) id of the user who received the notification description varchar(255) description of the notificatiosn date notification datetime date and time of the notification

is read int(1) datermines if the notification has already been read type varchar(25) type of the notification

Table 7: message table

Attribute Data Type Description

id int(11) unique id of the message convo id int(11) conversation of the message date message datetime date and time the message has been sent

sender id int(11) id of sender of the message

content varchar(300) content of the message

Table 8: conversation table

Attribute Data Type Description

id int(11) unique id of the conversation first user id int(11) unique id of the first user second user id int(11) unique id of the second user

Table 9: uploads table

Attribute Data Type Description id int(11) unique id of the upload prodid int(11) product id of the upload

name varchar(32) filename of the upload Table 10: message notifications table

Attribute Data Type Description

id int(11) unique id of the message notification

userid int(11) id of the user who received the message notification conversation id int(11) conversation id of the message notification unread messages int(11) number of unread messages

Table 11: account requests table

Attribute Data Type Description

id int(11) unique id of the account request

dateAcctReq datetime date and time the account has been requested email varchar(50) email address of the user

upmid varchar(20) unique id of the user at UP Manila college varchar(50) college of the user who requested contactNum varchar(20) contact number of the user

isInd int(1) determines if the user is an individual lName varchar(100) last name of the user if the user is an individual fName varchar(100) first name of the user if the user is an individual mName varchar(100) middle name of the user if the user is an individual orgName varchar(100) name of the organization if the user is an organization

Table 12: buyer reports table Attribute Data Type Description

id int(11) unique id of the report date report datetime date and time of the report

userid int(11) id of the buyer being reported reporter id int(11) id of the reported/seller description varchar(255) reason for reporting the buyer

image varchar(50) filename of the image as proof

Dokumen terkait