Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

FPT FACILITIES FEEDBACK

Software Design Document

– Ho Chi Minh, November 2021 –


Table of Contents

I. Overview.............................................................................................................................................3
1. Code Packages/Namespaces...............................................................................................................3
2. Database Schema................................................................................................................................5
II. Code Designs......................................................................................................................................6
1. Reporter send new feedback...............................................................................................................6
a. Class Diagram...................................................................................................................................6
b. Sequence Diagram(s).......................................................................................................................7
2. Manager assign feedback to an employee..........................................................................................8
a. Class Diagram...................................................................................................................................8
b. Sequence Diagram(s).......................................................................................................................8
3. Employee send report about feedback................................................................................................9
a. Class Diagram...................................................................................................................................9
b. Sequence Diagram(s).......................................................................................................................9
III. Database Tables................................................................................................................................9
1. tblUsers...............................................................................................................................................9
2. tblUsersStatus....................................................................................................................................10
3. tblRoles..............................................................................................................................................10
4. tblDepartments.................................................................................................................................10
5. tblFeedbacks......................................................................................................................................10
6. tblFacilities.........................................................................................................................................10
7. tblFeedbackImages............................................................................................................................11
8. tblFeedbackStatus.............................................................................................................................11
9. tblReports..........................................................................................................................................11
10. tblReportImages..............................................................................................................................11
11. tblReportStatus................................................................................................................................11
12. tblRates............................................................................................................................................11
I. Overview
1. Code Packages/Namespaces

Figure 1. Server Architecture Diagram

Package descriptions & package class naming conventions


No Package Description
01 controllers -This package contains classes to provide services to users by combining
many functions from model packages and Web Pages to render pages.
ActionNameController.java
02 department -This package contains DTO classes containing Value Objects and DAO
classes containing functions belonging to departmental objects.
NameDAO.java
NameDTO.java
03 facilities This package contains DTO classes containing Value Objects and DAO classes
containing functions belonging to facilities objects.
NameDAO.java
NameDTO.java
04 feedback -This package contains DTO classes containing Value Objects and DAO
classes containing functions belonging to feedback objects.
NameDAO.java
NameDTO.java
05 googleuser -This package contains classes that support getting user information via
gmail and storing user information to support login with gmail and use in
Authentication and Authorization in the system.
NameDAO.java
NameDTO.java
06 image -This package contains DTO classes containing Value Objects and DAO
classes containing functions belonging to image objects.
NameDAO.java
NameDTO.java
07 report -This package contains DTO classes containing Value Objects and DAO
classes containing functions belonging to report objects.
NameDAO.java
NameDTO.java
08 utils -This package contains classes to support other classes to perform purposes,
such as getting user information via google mail, getting date and time,...

09 Web Pages -This package contains the support files that provide rendering for the
website
name.jsp
2. Database Schema

Figure 2. Database Diagram

Table descriptions & package class naming conventions are as below


No Table Description
01 tblUsers Contains the user’s information
- Primary keys: email
- Foreign keys: [roleID,depID,statusID]
02 tblUsersStatus Contains the user’s status
- Primary keys: statusID

03 tblRoles Contains the user’s role


- Primary keys: roleID

04 tblDepartments Contains the user’s Departments


- Primary keys: depID

05 tblFeedbacks Contains the feedback’s information


- Primary keys: feedbackID
- Foreign keys: [senderEmail, handlerEmail,facilityID,statusID]
06 tblFacilities Contains the feedback’s facilities
- Primary keys: facilityID

07 tblFeedbackImages Contains the image’s information of feedbacks


- Primary keys: imageID
- Foreign keys: [feedbackID]
08 tblFeedbackStatus Contains the feedback’s status
- Primary keys: statusID

09 tblReports Contains the report’s information


- Primary keys: reportID
- Foreign keys: [statusID,feedbackID]
10 tblReportImages Contains the image’s information of report
- Primary keys: imageID
- Foreign keys: [reportID]

11 tblReportStatus Contains the report’s status


- Primary keys: statusID

12 tblRates Contains the rate’s information of employees


- Primary keys: email

II. Code Designs


1. Reporter send new feedback
a. Class Diagram
b. Sequence Diagram(s)
2. Manager assign feedback to an employee
a. Class Diagram

b. Sequence Diagram(s)
3. Employee send report about feedback
a. Class Diagram

b. Sequence Diagram(s)

III. Database Tables


1. tblUsers
# Uniq Not
Field name Type Size PK/FK Notes
ue Null

1 email nvarchar 100 x x PK

2 fullName nvarchar 100 x


3 picture nvarchar 200 x

4 roleID nvarchar 10 x FK

5 depID int FK

6 statusID int x FK

2. tblUsersStatus
# Uniq Not
Field name Type Size PK/FK Notes
ue Null

1 statusID int x x PK

2 statusName nvarchar 50 x

3. tblRoles
# Uniq Not
Field name Type Size PK/FK Notes
ue Null

1 roleID nvarchar 50 x x PK

2 roleName nvarchar 50 x

4. tblDepartments
# Uniq Not
Field name Type Size PK/FK Notes
ue Null

1 depID int x x PK

2 depName nvarchar 50 x

5. tblFeedbacks
# Uniq Not
Field name Type Size PK/FK Notes
ue Null

1 feedbackID nvarchar 50 x x PK

2 senderEmail nvarchar 100 x FK

3 title nvarchar 150 x

4 description nvarchar 4000 x

5 sentTime datetime x
6 handlerEmail nvarchar 100 FK

7 roomNumber int x

8 facilityID nvarchar 10 x FK

9 statusID int x FK

10 deleteReason nvarchar 100

11 assignTime datetime

12 completeTime datetime

6. tblFacilities
# Uniq Not
Field name Type Size PK/FK Notes
ue Null

1 facilityID nvarchar 10 x x PK

2 facilityName nvarchar 20 x

7. tblFeedbackImages
# Uniq Not
Field name Type Size PK/FK Notes
ue Null

1 imageID int x x PK

2 imageURL nvarchar 200 x

3 feedbackID nvarchar 50 x FK

8. tblFeedbackStatus
# Uniq Not
Field name Type Size PK/FK Notes
ue Null

1 statusID int x x PK

2 statusName nvarchar 50 x

9. tblReports
# Uniq Not
Field name Type Size PK/FK Notes
ue Null

1 reportID nvarchar 100 x PK

2 statusID int x FK
3 feedbackID nvarchar 50 x FK

4 description nvarchar 2000

5 spentMoney int x

6 time datetime x

7 rated int

10. tblReportImages
# Uniq Not
Field name Type Size PK/FK Notes
ue Null

1 imageID int x x PK

2 imageURL nvarchar 200 x

3 reportID nvarchar 100 x FK

11. tblReportStatus
# Uniq Not
Field name Type Size PK/FK Notes
ue Null

1 statusID int x x PK

2 statusName nvarchar 50 x

12. tblRates
# Uni Not
Field name Type Size PK/FK Notes
que Null

1 email nvarchar 100 x x PK

2 handledFeedbacks int x

3 rate float

You might also like