update,
This commit is contained in:
429
ryankochun91735/task1/project/_doc_source/Final_Report/erd.md
Normal file
429
ryankochun91735/task1/project/_doc_source/Final_Report/erd.md
Normal file
@@ -0,0 +1,429 @@
|
||||
# Database design (ERD) and metadata
|
||||
|
||||

|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
# Tables
|
||||
|
||||
## tbl_addresses
|
||||
|
||||
```php
|
||||
Schema::create('tbl_brands', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('name')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
----------- | ---------------------
|
||||
id | id of brands
|
||||
name | name of brands
|
||||
description | description of brands
|
||||
|
||||
## tbl_brands
|
||||
|
||||
```php
|
||||
Schema::create('tbl_brands', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('name')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
----------- | ---------------------
|
||||
id | id of brands
|
||||
name | name of brands
|
||||
description | description of brands
|
||||
|
||||
## tbl_categories
|
||||
|
||||
```php
|
||||
Schema::create('tbl_categories', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('name')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
----------- | ---------------------
|
||||
id | id of brands
|
||||
name | name of brands
|
||||
description | description of brands
|
||||
|
||||
## tbl_items
|
||||
|
||||
```php
|
||||
Schema::create('tbl_items', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('name')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
----------- | ---------------------
|
||||
id | id of brands
|
||||
name | name of brands
|
||||
description | description of brands
|
||||
|
||||
## tbl_orders
|
||||
|
||||
```php
|
||||
Schema::create('tbl_orders', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('name')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
|
||||
$table->string('status')->default('pending');
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
----------- | ---------------------
|
||||
id | id of orders
|
||||
name | name of orders
|
||||
description | description of orders
|
||||
status | status of orders
|
||||
|
||||
## tbl_projects
|
||||
|
||||
```php
|
||||
Schema::create('tbl_projects', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('name')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
----------- | -----------------------
|
||||
id | id of projects
|
||||
name | name of projects
|
||||
description | description of projects
|
||||
|
||||
## tbl_user_groups
|
||||
|
||||
```php
|
||||
Schema::create('tbl_user_groups', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('name')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
----------- | --------------------------
|
||||
id | id of user_groups
|
||||
name | name of user_groups
|
||||
description | description of user_groups
|
||||
|
||||
## tbl_user_roles
|
||||
|
||||
```php
|
||||
Schema::create('tbl_user_roles', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('name')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
----------- | -------------------------
|
||||
id | id of user_roles
|
||||
name | name of user_roles
|
||||
description | description of user_roles
|
||||
|
||||
## users
|
||||
|
||||
```php
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('username');
|
||||
$table->string('firstname')->nullable();
|
||||
$table->string('lastname')->nullable();
|
||||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->string('address')->nullable();
|
||||
$table->string('city')->nullable();
|
||||
$table->string('country')->nullable();
|
||||
$table->string('postal')->nullable();
|
||||
$table->integer('status')->default(1);
|
||||
$table->integer('groups')->default();
|
||||
$table->integer('roles')->default(5);
|
||||
$table->text('about')->nullable();
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
----------------- | -------------------------------------------------------------
|
||||
username | username of user
|
||||
firstname | first name of user
|
||||
lastname | last name of user
|
||||
email | email of user
|
||||
email_verified_at | email verification time of user
|
||||
password | salted passdword of usera
|
||||
address | address of user
|
||||
city | city of user
|
||||
country | country of user
|
||||
postal | postal of user
|
||||
status | status of user
|
||||
groups | groups of user
|
||||
roles | roles of user, default to `Guest` (ref: to `tbl_user_groups`)
|
||||
about | about of user
|
||||
|
||||
# relation tables (many-to-many table)
|
||||
|
||||
## rel_address_item.php
|
||||
|
||||
```php
|
||||
Schema::create('rel_address_item', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->unsignedBigInteger('item_id');
|
||||
$table
|
||||
->foreign('item_id')
|
||||
->references('id')
|
||||
->on('tbl_items')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unsignedBigInteger('address_id');
|
||||
$table
|
||||
->foreign('address_id')
|
||||
->references('id')
|
||||
->on('tbl_addresses')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
---------- | ------------------------------------
|
||||
item_id | id of items (ref: tbl_items->id)
|
||||
address_id | id of items (ref: tbl_addresses->id)
|
||||
|
||||
## rel_brand_item.php
|
||||
|
||||
```php
|
||||
Schema::create('rel_brand_item', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->unsignedBigInteger('item_id');
|
||||
$table
|
||||
->foreign('item_id')
|
||||
->references('id')
|
||||
->on('tbl_items')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unsignedBigInteger('brand_id');
|
||||
$table
|
||||
->foreign('brand_id')
|
||||
->references('id')
|
||||
->on('tbl_brands')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
-------- | ----------------------------------
|
||||
item_id | id of items (ref: tbl_items->id)
|
||||
brand_id | id of brands (ref: tbl_brands->id)
|
||||
|
||||
## rel_category_item.php
|
||||
|
||||
```php
|
||||
Schema::create('rel_category_item', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->unsignedBigInteger('item_id');
|
||||
$table
|
||||
->foreign('item_id')
|
||||
->references('id')
|
||||
->on('tbl_items')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unsignedBigInteger('category_id');
|
||||
$table
|
||||
->foreign('category_id')
|
||||
->references('id')
|
||||
->on('tbl_categories')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
------------- | ------------------------------------------
|
||||
item_id | id of items (ref: tbl_items->id)
|
||||
categories_id | id of categories (ref: tbl_categories->id)
|
||||
|
||||
## rel_order_owner.php
|
||||
|
||||
```php
|
||||
Schema::create('rel_order_owner', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
|
||||
$table->unsignedBigInteger('order_id');
|
||||
$table
|
||||
->foreign('order_id')
|
||||
->references('id')
|
||||
->on('tbl_orders')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table
|
||||
->foreign('user_id')
|
||||
->references('id')
|
||||
->on('users')
|
||||
->onDelete('cascade');
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
-------- | ---------------------------------
|
||||
order_id | id of items (ref: tbl_orders->id)
|
||||
user_id | id of categories (ref: users->id)
|
||||
|
||||
## rel_order_project.php
|
||||
|
||||
```php
|
||||
Schema::create('rel_order_project', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->unsignedBigInteger('project_id');
|
||||
$table
|
||||
->foreign('project_id')
|
||||
->references('id')
|
||||
->on('tbl_projects')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unsignedBigInteger('order_id');
|
||||
$table
|
||||
->foreign('order_id')
|
||||
->references('id')
|
||||
->on('tbl_orders')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
---------- | -------------------------------------
|
||||
project_id | id of project (ref: tbl_projects->id)
|
||||
order_id | id of order (ref: tbl_orders->id)
|
||||
|
||||
## rel_project_owner.php
|
||||
|
||||
```php
|
||||
Schema::create('rel_project_owner', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
|
||||
$table->unsignedBigInteger('project_id');
|
||||
$table
|
||||
->foreign('project_id')
|
||||
->references('id')
|
||||
->on('tbl_projects')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table
|
||||
->foreign('user_id')
|
||||
->references('id')
|
||||
->on('users')
|
||||
->onDelete('cascade');
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
---------- | -------------------------------------
|
||||
project_id | id of project (ref: tbl_projects->id)
|
||||
order_id | id of order (ref: tbl_orders->id)
|
||||
|
||||
## rel_user_item.php
|
||||
|
||||
```php
|
||||
Schema::create('rel_user_item', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->unsignedBigInteger('item_id');
|
||||
$table
|
||||
->foreign('item_id')
|
||||
->references('id')
|
||||
->on('tbl_items')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table
|
||||
->foreign('user_id')
|
||||
->references('id')
|
||||
->on('users')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
------- | -------------------------------
|
||||
item_id | id of item (ref: tbl_items->id)
|
||||
user_id | id of user (ref: users->id)
|
||||
|
||||
## rel_user_user_group.php
|
||||
|
||||
```php
|
||||
Schema::create('rel_user_user_group', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
|
||||
// default to guest
|
||||
$table->unsignedBigInteger('user_group_id');
|
||||
$table
|
||||
->foreign('user_group_id')
|
||||
->references('id')
|
||||
->on('tbl_user_groups')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table
|
||||
->foreign('user_id')
|
||||
->references('id')
|
||||
->on('users')
|
||||
->onDelete('cascade');
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
------------- | -------------------------------------------
|
||||
user_group_id | id of user_group (ref: tbl_user_groups->id)
|
||||
user_id | id of users (ref: users->id)
|
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 1018 KiB |
114
ryankochun91735/task1/project/_doc_source/Final_Report/index.md
Normal file
114
ryankochun91735/task1/project/_doc_source/Final_Report/index.md
Normal file
@@ -0,0 +1,114 @@
|
||||
## Final Report
|
||||
|
||||
### Cover
|
||||
|
||||
Please refer to cover template
|
||||
|
||||
### Abstract
|
||||
|
||||
One or two paragraph(s) to show the objectives of the project and the final report.
|
||||
|
||||
### Acknowledgement
|
||||
|
||||
Thank those who have helped in conducting the project
|
||||
|
||||
### Table of Contents
|
||||
|
||||
You must use automatic tool to create this, e.g. “Table of Contents” in MS Word
|
||||
|
||||
### Introduction
|
||||
|
||||
It should be exceed more than one page, including
|
||||
|
||||
1. Project title
|
||||
|
||||
1. General descriptions of the project objectives
|
||||
|
||||
1. General descriptions of the project results
|
||||
|
||||
1. Document structure with chapter titles
|
||||
|
||||
### Project Background and Problem Analysis
|
||||
|
||||
1. Scope of the problem
|
||||
|
||||
1. Problem Statements and description
|
||||
|
||||
### Proposed Solution
|
||||
|
||||
1. Scope of the proposed solution
|
||||
|
||||
1. Architecture of the proposed system and roles of hardwares
|
||||
|
||||
1. Advantages and drawbacks of the solution
|
||||
|
||||
1. block diagram
|
||||
|
||||

|
||||
|
||||
### Requirements
|
||||
|
||||
1. Roles of users
|
||||
|
||||
1. Functional Requirements
|
||||
|
||||
1. Non-functional Requirements:
|
||||
E.g. Reliability requirements, performance requirements, existing data interface and hardware environment, future extensions of the proposed solution, required implementation language.
|
||||
|
||||
### Documentation for Problem Analysis
|
||||
|
||||
1. Use Case Diagrams
|
||||
They should map to your requirements in the previous chapters
|
||||
|
||||
1. Fully Dressed Use Cases
|
||||
|
||||
### Documentation for Detailed Design
|
||||
1. Database design (ERD) and metadata
|
||||
- 
|
||||
|
||||
|
||||
[erd.md](./erd.md)
|
||||
|
||||
|
||||
1. System design (Data Flow Diagram, Class Diagram, etc.)
|
||||
|
||||
1. User interface design
|
||||
- 
|
||||
|
||||
### Implementation
|
||||
1. Test plans and results
|
||||
1. Changes to design and justification of changes (if any)
|
||||
|
||||
### Results and conclusions
|
||||
|
||||
1. Summary and critical discussion of the results
|
||||
|
||||
1. Limitations of the final products / solutions
|
||||
- no access control at this stage.
|
||||
- no pagination at this stage
|
||||
- if a lot of items it will congest in the same page.
|
||||
- mail server setup for demo purpose.
|
||||
- single language only
|
||||
|
||||
1. Problems/difficulties encountered
|
||||
- need to familiar with the framework used (e.g. laravel orm...)
|
||||
- feasibility study of the theme with framework used (e.g. laravel, scss..)
|
||||
- need tryout docker concept
|
||||
|
||||
1. Delays/changes in project schedule
|
||||
|
||||
1. Suggestion of further improvements / development
|
||||
- include more item.
|
||||
- multilingual...
|
||||
|
||||
### References
|
||||
|
||||
- [docker documentation](https://docs.docker.com/)
|
||||
- [laravel 10.x documentation](https://laravel.com/docs/10.x/readme)
|
||||
- [github/mailhog](https://github.com/mailhog/MailHog)
|
||||
- [mysql documentation](https://dev.mysql.com/doc/)
|
||||
- [phpmyadmin documentation](https://www.phpmyadmin.net/docs/)
|
||||
- [creativetim argon dashboard documentation](https://argon-dashboard-laravel.creative-tim.com/docs/bootstrap/overview/argon-dashboard/index.html)
|
||||
|
||||
### Appendices
|
||||
-
|
@@ -0,0 +1,59 @@
|
||||
graph LR;
|
||||
A(/dashboard)-->B(/profile);
|
||||
|
||||
A-->C(/items);
|
||||
C-->C1(/create)
|
||||
C-->C2(/view)
|
||||
C-->C3(/edit)
|
||||
C-->C4(/delete)
|
||||
|
||||
A-->D(/orders)
|
||||
D-->D1(/create)
|
||||
D-->D2(/view)
|
||||
D-->D3(/edit)
|
||||
D-->D4(/delete)
|
||||
|
||||
A-->E(/projects)
|
||||
E-->E1(/create)
|
||||
E-->E2(/view)
|
||||
E-->E3(/edit)
|
||||
E-->E4(/delete)
|
||||
|
||||
A-->F(/users)
|
||||
F-->F1(/create)
|
||||
F-->F2(/view)
|
||||
F-->F3(/edit)
|
||||
F-->F4(/delete)
|
||||
|
||||
A-->G(/user_roles)
|
||||
G-->G1(/create)
|
||||
G-->G2(/view)
|
||||
G-->G3(/edit)
|
||||
G-->G4(/delete)
|
||||
|
||||
|
||||
A-->H(/user_groups)
|
||||
H-->H1(/create)
|
||||
H-->H2(/view)
|
||||
H-->H3(/edit)
|
||||
H-->H4(/delete)
|
||||
|
||||
A-->I(/addresses)
|
||||
I-->I1(/create)
|
||||
I-->I2(/view)
|
||||
I-->I3(/edit)
|
||||
I-->I4(/delete)
|
||||
|
||||
A-->J(/categories)
|
||||
J-->J1(/create)
|
||||
J-->J2(/view)
|
||||
J-->J3(/edit)
|
||||
J-->J4(/delete)
|
||||
|
||||
A-->K(/brands)
|
||||
K-->K1(/create)
|
||||
K-->K2(/view)
|
||||
K-->K3(/edit)
|
||||
K-->K4(/delete)
|
||||
|
||||
A-->L(/logouts)
|
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 60 KiB |
@@ -0,0 +1,86 @@
|
||||
<mxfile host="65bd71144e">
|
||||
<diagram id="sFCz8x-gxcecHwNoj5ea" name="Page-1">
|
||||
<mxGraphModel dx="1060" dy="992" grid="1" gridSize="2" guides="0" tooltips="1" connect="0" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0"/>
|
||||
<mxCell id="1" parent="0"/>
|
||||
<mxCell id="18" value="System block diagram" style="rounded=0;whiteSpace=wrap;html=1;verticalAlign=bottom;fontSize=16;strokeColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="184" y="6" width="614" height="596" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="2" value="docker" style="rounded=1;whiteSpace=wrap;html=1;verticalAlign=bottom;movable=0;resizable=0;rotatable=0;deletable=0;editable=0;connectable=0;" parent="1" vertex="1">
|
||||
<mxGeometry x="248" y="52" width="484" height="276" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="3" value="laravel(php)" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="427.5" y="248" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="4" value="mariaDB(mysql)" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="427.5" y="92" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="5" value="web client" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="427.5" y="410" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="6" value="phpmyadmin<br>(db explorer)" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="586" y="246" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="7" value="mailhog<br>(dump mail server for test)" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="268" y="248" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="8" value="browse" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="3" target="5">
|
||||
<mxGeometry x="0.1765" y="21" width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="500" y="410" as="sourcePoint"/>
|
||||
<mxPoint x="410" y="380" as="targetPoint"/>
|
||||
<mxPoint as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="12" value="browse" style="endArrow=classic;html=1;exitX=0.44;exitY=0.987;exitDx=0;exitDy=0;exitPerimeter=0;edgeStyle=orthogonalEdgeStyle;entryX=0.288;entryY=-0.01;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="7" target="5">
|
||||
<mxGeometry x="-0.0227" y="-7" width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="302" y="396" as="sourcePoint"/>
|
||||
<mxPoint x="352" y="346" as="targetPoint"/>
|
||||
<Array as="points">
|
||||
<mxPoint x="321" y="380"/>
|
||||
<mxPoint x="462" y="380"/>
|
||||
</Array>
|
||||
<mxPoint as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="13" value="write" style="endArrow=classic;html=1;exitX=0.702;exitY=-0.022;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.703;entryY=0.979;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="3" target="4">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="462" y="260" as="sourcePoint"/>
|
||||
<mxPoint x="512" y="210" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="14" value="read" style="endArrow=classic;html=1;exitX=0.396;exitY=1.023;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.395;entryY=-0.012;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="4" target="3">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="520" y="254" as="sourcePoint"/>
|
||||
<mxPoint x="570" y="204" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="15" value="write" style="endArrow=classic;html=1;edgeStyle=orthogonalEdgeStyle;exitX=0.639;exitY=0.012;exitDx=0;exitDy=0;exitPerimeter=0;entryX=1.006;entryY=0.323;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="6" target="4">
|
||||
<mxGeometry x="-0.2257" width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="680" y="184" as="sourcePoint"/>
|
||||
<mxPoint x="632" y="100" as="targetPoint"/>
|
||||
<mxPoint as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="16" value="read" style="endArrow=classic;html=1;entryX=0.332;entryY=0.023;entryDx=0;entryDy=0;entryPerimeter=0;exitX=1.007;exitY=0.607;exitDx=0;exitDy=0;exitPerimeter=0;edgeStyle=orthogonalEdgeStyle;" edge="1" parent="1" source="4" target="6">
|
||||
<mxGeometry x="0.0289" width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="594" y="194.00000000000023" as="sourcePoint"/>
|
||||
<mxPoint x="644" y="144.00000000000023" as="targetPoint"/>
|
||||
<mxPoint as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="17" value="browse" style="endArrow=classic;html=1;exitX=0.497;exitY=0.979;exitDx=0;exitDy=0;exitPerimeter=0;edgeStyle=orthogonalEdgeStyle;" edge="1" parent="1" source="6">
|
||||
<mxGeometry x="0.0118" y="10" width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="604" y="348.02000000000004" as="sourcePoint"/>
|
||||
<mxPoint x="506" y="408" as="targetPoint"/>
|
||||
<Array as="points">
|
||||
<mxPoint x="646" y="378"/>
|
||||
<mxPoint x="506" y="378"/>
|
||||
</Array>
|
||||
<mxPoint as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
BIN
ryankochun91735/task1/project/_doc_source/Final_Report/simple_block.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/Final_Report/simple_block.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -0,0 +1,29 @@
|
||||
# Installation_Deployment_Guide
|
||||
|
||||
## Requirement
|
||||
|
||||
- linux (preferrable fedora)
|
||||
|
||||
- [docker](https://docs.docker.com/)
|
||||
- [docker compose](https://docs.docker.com/compose/)
|
||||
- [docker hub](https://hub.docker.com/)
|
||||
- [mysql](https://hub.docker.com/_/mysql)
|
||||
- [phpmyadmin](https://hub.docker.com/_/phpmyadmin)
|
||||
- [mailhog](https://github.com/mailhog/MailHog)
|
||||
|
||||
|
||||
## to start
|
||||
|
||||
1. start vm
|
||||
- username: fedora
|
||||
- password: 123456
|
||||
|
||||
2. inside vm
|
||||
```bash
|
||||
# start docker, configuration defined by docker-compose.yml
|
||||
$ cd src
|
||||
$ ./dc_up.sh
|
||||
|
||||
# after docker started
|
||||
$ ./setup/9999_done.sh
|
||||
```
|
BIN
ryankochun91735/task1/project/_doc_source/Preliminary_Study/service_now/create_new_user.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/Preliminary_Study/service_now/create_new_user.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ryankochun91735/task1/project/_doc_source/Preliminary_Study/service_now/edit_roles.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/Preliminary_Study/service_now/edit_roles.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ryankochun91735/task1/project/_doc_source/Preliminary_Study/service_now/find_real_file.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/Preliminary_Study/service_now/find_real_file.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ryankochun91735/task1/project/_doc_source/Preliminary_Study/service_now/role_selection.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/Preliminary_Study/service_now/role_selection.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ryankochun91735/task1/project/_doc_source/Preliminary_Study/service_now/select_user.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/Preliminary_Study/service_now/select_user.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ryankochun91735/task1/project/_doc_source/Preliminary_Study/service_now/service_now_agent10.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/Preliminary_Study/service_now/service_now_agent10.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ryankochun91735/task1/project/_doc_source/Preliminary_Study/service_now/service_now_agent9.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/Preliminary_Study/service_now/service_now_agent9.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ryankochun91735/task1/project/_doc_source/Preliminary_Study/service_now/sla_in_servicenow_with_example.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/Preliminary_Study/service_now/sla_in_servicenow_with_example.png
(Stored with Git LFS)
Normal file
Binary file not shown.
142
ryankochun91735/task1/project/_doc_source/User Guide.md
Normal file
142
ryankochun91735/task1/project/_doc_source/User Guide.md
Normal file
@@ -0,0 +1,142 @@
|
||||
# Documents and final products in soft copies
|
||||
|
||||
## Preliminary Study (original submitted version)
|
||||
|
||||
## Initial Report (original submitted version)
|
||||
|
||||
## Interim Report (original submitted version)
|
||||
|
||||
## Final Report
|
||||
|
||||
## Source code and applications (e.g. apk file)
|
||||
|
||||
## Installation / Deployment Guide
|
||||
|
||||
## User Guide
|
||||
|
||||
## Presentation slides
|
||||
|
||||
## Peer Review (per each member)
|
||||
|
||||
## Critical Evaluation (per each member)
|
||||
|
||||
# Hard-copy documents
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Final Report
|
||||
|
||||
### Cover
|
||||
|
||||
Please refer to cover template
|
||||
|
||||
### Abstract
|
||||
|
||||
One or two paragraph(s) to show the objectives of the project and the final report.
|
||||
|
||||
### Acknowledgement
|
||||
|
||||
Thank those who have helped in conducting the project
|
||||
|
||||
### Table of Contents
|
||||
|
||||
You must use automatic tool to create this, e.g. “Table of Contents” in MS Word
|
||||
|
||||
### Introduction
|
||||
|
||||
It should be exceed more than one page, including
|
||||
|
||||
1. Project title
|
||||
|
||||
1. General descriptions of the project objectives
|
||||
|
||||
1. General descriptions of the project results
|
||||
|
||||
1. Document structure with chapter titles
|
||||
|
||||
### Project Background and Problem Analysis
|
||||
|
||||
1. Scope of the problem
|
||||
|
||||
1. Problem Statements and description
|
||||
|
||||
### Proposed Solution
|
||||
|
||||
1. Scope of the proposed solution
|
||||
|
||||
1. Architecture of the proposed system and roles of hardwares
|
||||
|
||||
1. Advantages and drawbacks of the solution
|
||||
|
||||
### Requirements
|
||||
|
||||
1. Roles of users
|
||||
|
||||
1. Functional Requirements
|
||||
|
||||
1. Non-functional Requirements:
|
||||
E.g. Reliability requirements, performance requirements, existing data interface and hardware environment, future extensions of the proposed solution, required implementation language.
|
||||
|
||||
### Documentation for Problem Analysis
|
||||
|
||||
1. Use Case Diagrams
|
||||
They should map to your requirements in the previous chapters
|
||||
|
||||
1. Fully Dressed Use Cases
|
||||
|
||||
### Documentation for Detailed Design
|
||||
1. Database design (ERD) and metadata
|
||||
- 
|
||||
|
||||
|
||||
[erd.md](./erd.md)
|
||||
|
||||
|
||||
1. System design (Data Flow Diagram, Class Diagram, etc.)
|
||||
|
||||
1. User interface design
|
||||
- 
|
||||
|
||||
### Implementation
|
||||
1. Test plans and results
|
||||
1. Changes to design and justification of changes (if any)
|
||||
|
||||
### Results and conclusions
|
||||
|
||||
1. Summary and critical discussion of the results
|
||||
|
||||
1. Limitations of the final products / solutions
|
||||
- no access control at this stage.
|
||||
- no pagination at this stage
|
||||
- if a lot of items it will congest in the same page.
|
||||
- mail server setup for demo purpose.
|
||||
- single language only
|
||||
|
||||
1. Problems/difficulties encountered
|
||||
- need to familiar with the framework used (e.g. laravel orm...)
|
||||
- feasibility study of the theme with framework used (e.g. laravel, scss..)
|
||||
- need tryout docker concept
|
||||
|
||||
1. Delays/changes in project schedule
|
||||
|
||||
1. Suggestion of further improvements / development
|
||||
- include more item.
|
||||
- multilingual...
|
||||
|
||||
### References
|
||||
|
||||
- [docker documentation](https://docs.docker.com/)
|
||||
- [laravel 10.x documentation](https://laravel.com/docs/10.x/readme)
|
||||
- [github/mailhog](https://github.com/mailhog/MailHog)
|
||||
- [mysql documentation](https://dev.mysql.com/doc/)
|
||||
- [phpmyadmin documentation](https://www.phpmyadmin.net/docs/)
|
||||
- [creativetim argon dashboard documentation](https://argon-dashboard-laravel.creative-tim.com/docs/bootstrap/overview/argon-dashboard/index.html)
|
||||
|
||||
### Appendices
|
||||
-
|
||||
|
||||
## User Guide
|
@@ -0,0 +1,58 @@
|
||||
# User Guide
|
||||
|
||||
## page hierarchy
|
||||

|
||||
|
||||
## login
|
||||
|
||||

|
||||
|
||||
## dashboard
|
||||
|
||||

|
||||
|
||||
## profile
|
||||
|
||||

|
||||
|
||||
## items_list
|
||||
|
||||

|
||||
|
||||
## items_view
|
||||
|
||||

|
||||
|
||||
## items_edit
|
||||
|
||||

|
||||
|
||||
## orders_list
|
||||

|
||||
|
||||
## projects_list
|
||||

|
||||
|
||||
## user_list
|
||||

|
||||
|
||||
## user_roles_list
|
||||

|
||||
|
||||
## users_groups_list
|
||||

|
||||
|
||||
<!-- show user how to gen -->
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -0,0 +1,59 @@
|
||||
graph LR;
|
||||
A(/dashboard)-->B(/profile);
|
||||
|
||||
A-->C(/items);
|
||||
C-->C1(/create)
|
||||
C-->C2(/view)
|
||||
C-->C3(/edit)
|
||||
C-->C4(/delete)
|
||||
|
||||
A-->D(/orders)
|
||||
D-->D1(/create)
|
||||
D-->D2(/view)
|
||||
D-->D3(/edit)
|
||||
D-->D4(/delete)
|
||||
|
||||
A-->E(/projects)
|
||||
E-->E1(/create)
|
||||
E-->E2(/view)
|
||||
E-->E3(/edit)
|
||||
E-->E4(/delete)
|
||||
|
||||
A-->F(/users)
|
||||
F-->F1(/create)
|
||||
F-->F2(/view)
|
||||
F-->F3(/edit)
|
||||
F-->F4(/delete)
|
||||
|
||||
A-->G(/user_roles)
|
||||
G-->G1(/create)
|
||||
G-->G2(/view)
|
||||
G-->G3(/edit)
|
||||
G-->G4(/delete)
|
||||
|
||||
|
||||
A-->H(/user_groups)
|
||||
H-->H1(/create)
|
||||
H-->H2(/view)
|
||||
H-->H3(/edit)
|
||||
H-->H4(/delete)
|
||||
|
||||
A-->I(/addresses)
|
||||
I-->I1(/create)
|
||||
I-->I2(/view)
|
||||
I-->I3(/edit)
|
||||
I-->I4(/delete)
|
||||
|
||||
A-->J(/categories)
|
||||
J-->J1(/create)
|
||||
J-->J2(/view)
|
||||
J-->J3(/edit)
|
||||
J-->J4(/delete)
|
||||
|
||||
A-->K(/brands)
|
||||
K-->K1(/create)
|
||||
K-->K2(/view)
|
||||
K-->K3(/edit)
|
||||
K-->K4(/delete)
|
||||
|
||||
A-->L(/logouts)
|
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 60 KiB |
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/addresses_list.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/addresses_list.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/brands_list.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/brands_list.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/categories_list.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/categories_list.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/dashboard.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/dashboard.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/items_edit.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/items_edit.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/items_list.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/items_list.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/items_view.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/items_view.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/login.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/login.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/orders_list.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/orders_list.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/profile.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/profile.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/projects_list.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/projects_list.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/user_list.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/user_list.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/user_roles_list.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/user_roles_list.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/users_groups_list.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/User Guide/screenshot/users_groups_list.png
(Stored with Git LFS)
Normal file
Binary file not shown.
1
ryankochun91735/task1/project/_doc_source/convert.bat
Normal file
1
ryankochun91735/task1/project/_doc_source/convert.bat
Normal file
@@ -0,0 +1 @@
|
||||
mmdc -i page_hierarchy.mmd -o page_hierarchy.svg
|
429
ryankochun91735/task1/project/_doc_source/erd.md
Normal file
429
ryankochun91735/task1/project/_doc_source/erd.md
Normal file
@@ -0,0 +1,429 @@
|
||||
# Database design (ERD) and metadata
|
||||
|
||||

|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
# Tables
|
||||
|
||||
## tbl_addresses
|
||||
|
||||
```php
|
||||
Schema::create('tbl_brands', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('name')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
----------- | ---------------------
|
||||
id | id of brands
|
||||
name | name of brands
|
||||
description | description of brands
|
||||
|
||||
## tbl_brands
|
||||
|
||||
```php
|
||||
Schema::create('tbl_brands', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('name')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
----------- | ---------------------
|
||||
id | id of brands
|
||||
name | name of brands
|
||||
description | description of brands
|
||||
|
||||
## tbl_categories
|
||||
|
||||
```php
|
||||
Schema::create('tbl_categories', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('name')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
----------- | ---------------------
|
||||
id | id of brands
|
||||
name | name of brands
|
||||
description | description of brands
|
||||
|
||||
## tbl_items
|
||||
|
||||
```php
|
||||
Schema::create('tbl_items', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('name')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
----------- | ---------------------
|
||||
id | id of brands
|
||||
name | name of brands
|
||||
description | description of brands
|
||||
|
||||
## tbl_orders
|
||||
|
||||
```php
|
||||
Schema::create('tbl_orders', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('name')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
|
||||
$table->string('status')->default('pending');
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
----------- | ---------------------
|
||||
id | id of orders
|
||||
name | name of orders
|
||||
description | description of orders
|
||||
status | status of orders
|
||||
|
||||
## tbl_projects
|
||||
|
||||
```php
|
||||
Schema::create('tbl_projects', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('name')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
----------- | -----------------------
|
||||
id | id of projects
|
||||
name | name of projects
|
||||
description | description of projects
|
||||
|
||||
## tbl_user_groups
|
||||
|
||||
```php
|
||||
Schema::create('tbl_user_groups', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('name')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
----------- | --------------------------
|
||||
id | id of user_groups
|
||||
name | name of user_groups
|
||||
description | description of user_groups
|
||||
|
||||
## tbl_user_roles
|
||||
|
||||
```php
|
||||
Schema::create('tbl_user_roles', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->string('name')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
----------- | -------------------------
|
||||
id | id of user_roles
|
||||
name | name of user_roles
|
||||
description | description of user_roles
|
||||
|
||||
## users
|
||||
|
||||
```php
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('username');
|
||||
$table->string('firstname')->nullable();
|
||||
$table->string('lastname')->nullable();
|
||||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->string('address')->nullable();
|
||||
$table->string('city')->nullable();
|
||||
$table->string('country')->nullable();
|
||||
$table->string('postal')->nullable();
|
||||
$table->integer('status')->default(1);
|
||||
$table->integer('groups')->default();
|
||||
$table->integer('roles')->default(5);
|
||||
$table->text('about')->nullable();
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
----------------- | -------------------------------------------------------------
|
||||
username | username of user
|
||||
firstname | first name of user
|
||||
lastname | last name of user
|
||||
email | email of user
|
||||
email_verified_at | email verification time of user
|
||||
password | salted passdword of usera
|
||||
address | address of user
|
||||
city | city of user
|
||||
country | country of user
|
||||
postal | postal of user
|
||||
status | status of user
|
||||
groups | groups of user
|
||||
roles | roles of user, default to `Guest` (ref: to `tbl_user_groups`)
|
||||
about | about of user
|
||||
|
||||
# relation tables (many-to-many table)
|
||||
|
||||
## rel_address_item.php
|
||||
|
||||
```php
|
||||
Schema::create('rel_address_item', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->unsignedBigInteger('item_id');
|
||||
$table
|
||||
->foreign('item_id')
|
||||
->references('id')
|
||||
->on('tbl_items')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unsignedBigInteger('address_id');
|
||||
$table
|
||||
->foreign('address_id')
|
||||
->references('id')
|
||||
->on('tbl_addresses')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
---------- | ------------------------------------
|
||||
item_id | id of items (ref: tbl_items->id)
|
||||
address_id | id of items (ref: tbl_addresses->id)
|
||||
|
||||
## rel_brand_item.php
|
||||
|
||||
```php
|
||||
Schema::create('rel_brand_item', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->unsignedBigInteger('item_id');
|
||||
$table
|
||||
->foreign('item_id')
|
||||
->references('id')
|
||||
->on('tbl_items')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unsignedBigInteger('brand_id');
|
||||
$table
|
||||
->foreign('brand_id')
|
||||
->references('id')
|
||||
->on('tbl_brands')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
-------- | ----------------------------------
|
||||
item_id | id of items (ref: tbl_items->id)
|
||||
brand_id | id of brands (ref: tbl_brands->id)
|
||||
|
||||
## rel_category_item.php
|
||||
|
||||
```php
|
||||
Schema::create('rel_category_item', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->unsignedBigInteger('item_id');
|
||||
$table
|
||||
->foreign('item_id')
|
||||
->references('id')
|
||||
->on('tbl_items')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unsignedBigInteger('category_id');
|
||||
$table
|
||||
->foreign('category_id')
|
||||
->references('id')
|
||||
->on('tbl_categories')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
------------- | ------------------------------------------
|
||||
item_id | id of items (ref: tbl_items->id)
|
||||
categories_id | id of categories (ref: tbl_categories->id)
|
||||
|
||||
## rel_order_owner.php
|
||||
|
||||
```php
|
||||
Schema::create('rel_order_owner', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
|
||||
$table->unsignedBigInteger('order_id');
|
||||
$table
|
||||
->foreign('order_id')
|
||||
->references('id')
|
||||
->on('tbl_orders')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table
|
||||
->foreign('user_id')
|
||||
->references('id')
|
||||
->on('users')
|
||||
->onDelete('cascade');
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
-------- | ---------------------------------
|
||||
order_id | id of items (ref: tbl_orders->id)
|
||||
user_id | id of categories (ref: users->id)
|
||||
|
||||
## rel_order_project.php
|
||||
|
||||
```php
|
||||
Schema::create('rel_order_project', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->unsignedBigInteger('project_id');
|
||||
$table
|
||||
->foreign('project_id')
|
||||
->references('id')
|
||||
->on('tbl_projects')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unsignedBigInteger('order_id');
|
||||
$table
|
||||
->foreign('order_id')
|
||||
->references('id')
|
||||
->on('tbl_orders')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
---------- | -------------------------------------
|
||||
project_id | id of project (ref: tbl_projects->id)
|
||||
order_id | id of order (ref: tbl_orders->id)
|
||||
|
||||
## rel_project_owner.php
|
||||
|
||||
```php
|
||||
Schema::create('rel_project_owner', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
|
||||
$table->unsignedBigInteger('project_id');
|
||||
$table
|
||||
->foreign('project_id')
|
||||
->references('id')
|
||||
->on('tbl_projects')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table
|
||||
->foreign('user_id')
|
||||
->references('id')
|
||||
->on('users')
|
||||
->onDelete('cascade');
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
---------- | -------------------------------------
|
||||
project_id | id of project (ref: tbl_projects->id)
|
||||
order_id | id of order (ref: tbl_orders->id)
|
||||
|
||||
## rel_user_item.php
|
||||
|
||||
```php
|
||||
Schema::create('rel_user_item', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->unsignedBigInteger('item_id');
|
||||
$table
|
||||
->foreign('item_id')
|
||||
->references('id')
|
||||
->on('tbl_items')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table
|
||||
->foreign('user_id')
|
||||
->references('id')
|
||||
->on('users')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
------- | -------------------------------
|
||||
item_id | id of item (ref: tbl_items->id)
|
||||
user_id | id of user (ref: users->id)
|
||||
|
||||
## rel_user_user_group.php
|
||||
|
||||
```php
|
||||
Schema::create('rel_user_user_group', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
|
||||
// default to guest
|
||||
$table->unsignedBigInteger('user_group_id');
|
||||
$table
|
||||
->foreign('user_group_id')
|
||||
->references('id')
|
||||
->on('tbl_user_groups')
|
||||
->onDelete('cascade');
|
||||
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table
|
||||
->foreign('user_id')
|
||||
->references('id')
|
||||
->on('users')
|
||||
->onDelete('cascade');
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
field | description
|
||||
------------- | -------------------------------------------
|
||||
user_group_id | id of user_group (ref: tbl_user_groups->id)
|
||||
user_id | id of users (ref: users->id)
|
12
ryankochun91735/task1/project/_doc_source/erd.svg
Normal file
12
ryankochun91735/task1/project/_doc_source/erd.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 1018 KiB |
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
2
ryankochun91735/task1/project/_doc_source/index.md
Normal file
2
ryankochun91735/task1/project/_doc_source/index.md
Normal file
@@ -0,0 +1,2 @@
|
||||
## User Guide
|
||||
|
59
ryankochun91735/task1/project/_doc_source/page_hierarchy.mmd
Normal file
59
ryankochun91735/task1/project/_doc_source/page_hierarchy.mmd
Normal file
@@ -0,0 +1,59 @@
|
||||
graph LR;
|
||||
A(/dashboard)-->B(/profile);
|
||||
|
||||
A-->C(/items);
|
||||
C-->C1(/create)
|
||||
C-->C2(/view)
|
||||
C-->C3(/edit)
|
||||
C-->C4(/delete)
|
||||
|
||||
A-->D(/orders)
|
||||
D-->D1(/create)
|
||||
D-->D2(/view)
|
||||
D-->D3(/edit)
|
||||
D-->D4(/delete)
|
||||
|
||||
A-->E(/projects)
|
||||
E-->E1(/create)
|
||||
E-->E2(/view)
|
||||
E-->E3(/edit)
|
||||
E-->E4(/delete)
|
||||
|
||||
A-->F(/users)
|
||||
F-->F1(/create)
|
||||
F-->F2(/view)
|
||||
F-->F3(/edit)
|
||||
F-->F4(/delete)
|
||||
|
||||
A-->G(/user_roles)
|
||||
G-->G1(/create)
|
||||
G-->G2(/view)
|
||||
G-->G3(/edit)
|
||||
G-->G4(/delete)
|
||||
|
||||
|
||||
A-->H(/user_groups)
|
||||
H-->H1(/create)
|
||||
H-->H2(/view)
|
||||
H-->H3(/edit)
|
||||
H-->H4(/delete)
|
||||
|
||||
A-->I(/addresses)
|
||||
I-->I1(/create)
|
||||
I-->I2(/view)
|
||||
I-->I3(/edit)
|
||||
I-->I4(/delete)
|
||||
|
||||
A-->J(/categories)
|
||||
J-->J1(/create)
|
||||
J-->J2(/view)
|
||||
J-->J3(/edit)
|
||||
J-->J4(/delete)
|
||||
|
||||
A-->K(/brands)
|
||||
K-->K1(/create)
|
||||
K-->K2(/view)
|
||||
K-->K3(/edit)
|
||||
K-->K4(/delete)
|
||||
|
||||
A-->L(/logouts)
|
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 60 KiB |
91
ryankochun91735/task1/project/_doc_source/parking.md
Normal file
91
ryankochun91735/task1/project/_doc_source/parking.md
Normal file
@@ -0,0 +1,91 @@
|
||||
|
||||
|
||||
tbl_warehouse_items {
|
||||
int id
|
||||
int quantity
|
||||
string productCode
|
||||
|
||||
float pricePerUnit
|
||||
}
|
||||
|
||||
tbl_purchase_orders {
|
||||
int id
|
||||
int quantity
|
||||
string productCode
|
||||
|
||||
float pricePerUnit
|
||||
}
|
||||
|
||||
tbl_deliveries {
|
||||
int id
|
||||
int quantity
|
||||
string productCode
|
||||
|
||||
float pricePerUnit
|
||||
}
|
||||
|
||||
tbl_discounts {
|
||||
int id
|
||||
int quantity
|
||||
string productCode
|
||||
|
||||
float pricePerUnit
|
||||
}
|
||||
|
||||
tbl_invoices {
|
||||
int id
|
||||
int quantity
|
||||
string productCode
|
||||
|
||||
float pricePerUnit
|
||||
}
|
||||
|
||||
tbl_order_items {
|
||||
int id
|
||||
int quantity
|
||||
string productCode
|
||||
|
||||
float pricePerUnit
|
||||
}
|
||||
|
||||
tbl_payments {
|
||||
int id
|
||||
int quantity
|
||||
string productCode
|
||||
|
||||
float pricePerUnit
|
||||
}
|
||||
|
||||
tbl_returns {
|
||||
int id
|
||||
int quantity
|
||||
string productCode
|
||||
|
||||
float pricePerUnit
|
||||
}
|
||||
|
||||
|
||||
---
|
||||
|
||||
```mermaid
|
||||
erDiagram
|
||||
CUSTOMER ||--o{ ORDER : places
|
||||
CUSTOMER {
|
||||
string name
|
||||
string custNumber
|
||||
string sector
|
||||
}
|
||||
ORDER ||--|{ LINE-ITEM : contains
|
||||
ORDER {
|
||||
int orderNumber
|
||||
string deliveryAddress
|
||||
}
|
||||
LINE-ITEM {
|
||||
int id
|
||||
int quantity
|
||||
string productCode
|
||||
|
||||
float pricePerUnit
|
||||
}
|
||||
```
|
||||
|
52
ryankochun91735/task1/project/_doc_source/prompt.md
Normal file
52
ryankochun91735/task1/project/_doc_source/prompt.md
Normal file
@@ -0,0 +1,52 @@
|
||||
tbl_brands
|
||||
|
||||
generate 30 computer manufacturer brand name and descriptions,
|
||||
i want it in laravel seeder format,
|
||||
insert into tbl_brands
|
||||
show me the SQL only
|
||||
|
||||
generate 30 chinese computer manufacturer brand name and descriptions,
|
||||
i want it in laravel seeder format,
|
||||
insert into tbl_brands
|
||||
show me the SQL only
|
||||
|
||||
tbl_category
|
||||
generate 30 example computer name and descriptions,
|
||||
i want it in laravel seeder format,
|
||||
insert into tbl_categories
|
||||
|
||||
tbl_item
|
||||
generate 30 example computer name and descriptions,
|
||||
i want it in laravel seeder format,
|
||||
insert into tbl_items
|
||||
|
||||
tbl_order
|
||||
generate 30 example name and descriptions,
|
||||
i want it in laravel seeder format,
|
||||
insert into tbl_order
|
||||
|
||||
tbl_address
|
||||
generate 30 example name and descriptions,
|
||||
i want it in laravel seeder format,
|
||||
insert into tbl_address
|
||||
show me the SQL only
|
||||
|
||||
tbl_projects
|
||||
generate 30 example project name and descriptions,
|
||||
i want it in laravel seeder format,
|
||||
insert into tbl_projects
|
||||
show me the SQL only
|
||||
|
||||
tbl_user_roles
|
||||
|
||||
generate 30 example user group name and descriptions,
|
||||
i want it in laravel seeder format,
|
||||
insert into tbl_user_roles
|
||||
show me the SQL only
|
||||
|
||||
tbl_user_group
|
||||
|
||||
generate 30 example user group name and descriptions,
|
||||
i want it in laravel seeder format,
|
||||
insert into tbl_user_groups
|
||||
show me the SQL only
|
@@ -0,0 +1,86 @@
|
||||
<mxfile host="65bd71144e">
|
||||
<diagram id="sFCz8x-gxcecHwNoj5ea" name="Page-1">
|
||||
<mxGraphModel dx="1060" dy="992" grid="1" gridSize="2" guides="0" tooltips="1" connect="0" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0"/>
|
||||
<mxCell id="1" parent="0"/>
|
||||
<mxCell id="18" value="System block diagram" style="rounded=0;whiteSpace=wrap;html=1;verticalAlign=bottom;fontSize=16;strokeColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="184" y="6" width="614" height="596" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="2" value="docker" style="rounded=1;whiteSpace=wrap;html=1;verticalAlign=bottom;movable=0;resizable=0;rotatable=0;deletable=0;editable=0;connectable=0;" parent="1" vertex="1">
|
||||
<mxGeometry x="248" y="52" width="484" height="276" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="3" value="laravel(php)" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="427.5" y="248" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="4" value="mariaDB(mysql)" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="427.5" y="92" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="5" value="web client" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="427.5" y="410" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="6" value="phpmyadmin<br>(db explorer)" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="586" y="246" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="7" value="mailhog<br>(dump mail server for test)" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="268" y="248" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="8" value="browse" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="3" target="5">
|
||||
<mxGeometry x="0.1765" y="21" width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="500" y="410" as="sourcePoint"/>
|
||||
<mxPoint x="410" y="380" as="targetPoint"/>
|
||||
<mxPoint as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="12" value="browse" style="endArrow=classic;html=1;exitX=0.44;exitY=0.987;exitDx=0;exitDy=0;exitPerimeter=0;edgeStyle=orthogonalEdgeStyle;entryX=0.288;entryY=-0.01;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="7" target="5">
|
||||
<mxGeometry x="-0.0227" y="-7" width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="302" y="396" as="sourcePoint"/>
|
||||
<mxPoint x="352" y="346" as="targetPoint"/>
|
||||
<Array as="points">
|
||||
<mxPoint x="321" y="380"/>
|
||||
<mxPoint x="462" y="380"/>
|
||||
</Array>
|
||||
<mxPoint as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="13" value="write" style="endArrow=classic;html=1;exitX=0.702;exitY=-0.022;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.703;entryY=0.979;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="3" target="4">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="462" y="260" as="sourcePoint"/>
|
||||
<mxPoint x="512" y="210" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="14" value="read" style="endArrow=classic;html=1;exitX=0.396;exitY=1.023;exitDx=0;exitDy=0;exitPerimeter=0;entryX=0.395;entryY=-0.012;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="4" target="3">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="520" y="254" as="sourcePoint"/>
|
||||
<mxPoint x="570" y="204" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="15" value="write" style="endArrow=classic;html=1;edgeStyle=orthogonalEdgeStyle;exitX=0.639;exitY=0.012;exitDx=0;exitDy=0;exitPerimeter=0;entryX=1.006;entryY=0.323;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" source="6" target="4">
|
||||
<mxGeometry x="-0.2257" width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="680" y="184" as="sourcePoint"/>
|
||||
<mxPoint x="632" y="100" as="targetPoint"/>
|
||||
<mxPoint as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="16" value="read" style="endArrow=classic;html=1;entryX=0.332;entryY=0.023;entryDx=0;entryDy=0;entryPerimeter=0;exitX=1.007;exitY=0.607;exitDx=0;exitDy=0;exitPerimeter=0;edgeStyle=orthogonalEdgeStyle;" edge="1" parent="1" source="4" target="6">
|
||||
<mxGeometry x="0.0289" width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="594" y="194.00000000000023" as="sourcePoint"/>
|
||||
<mxPoint x="644" y="144.00000000000023" as="targetPoint"/>
|
||||
<mxPoint as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="17" value="browse" style="endArrow=classic;html=1;exitX=0.497;exitY=0.979;exitDx=0;exitDy=0;exitPerimeter=0;edgeStyle=orthogonalEdgeStyle;" edge="1" parent="1" source="6">
|
||||
<mxGeometry x="0.0118" y="10" width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="604" y="348.02000000000004" as="sourcePoint"/>
|
||||
<mxPoint x="506" y="408" as="targetPoint"/>
|
||||
<Array as="points">
|
||||
<mxPoint x="646" y="378"/>
|
||||
<mxPoint x="506" y="378"/>
|
||||
</Array>
|
||||
<mxPoint as="offset"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
BIN
ryankochun91735/task1/project/_doc_source/simple_block.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/simple_block.png
(Stored with Git LFS)
Normal file
Binary file not shown.
10
ryankochun91735/task1/project/_doc_source/tables.md
Normal file
10
ryankochun91735/task1/project/_doc_source/tables.md
Normal file
@@ -0,0 +1,10 @@
|
||||
tbl_brand
|
||||
tbl_category
|
||||
tbl_product
|
||||
tbl_item
|
||||
tbl_order
|
||||
tbl_address
|
||||
tbl_projects
|
||||
tbl_user
|
||||
tbl_user_role
|
||||
tbl_user_group
|
BIN
ryankochun91735/task1/project/_doc_source/tutorials24x7-mysql-inventory-database-design.png
(Stored with Git LFS)
Normal file
BIN
ryankochun91735/task1/project/_doc_source/tutorials24x7-mysql-inventory-database-design.png
(Stored with Git LFS)
Normal file
Binary file not shown.
Reference in New Issue
Block a user