Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamRuth01 committed Mar 17, 2024
1 parent 7514ae3 commit e57b099
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 84 deletions.
41 changes: 36 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,48 @@

* _Architecture_:
* * The development architecture have I been using `ER-Diagram` for create the tables and work out the __(PK)__ and __(FK)__, and for my own knowledge future on the road, keep things simple and don't do it complex.

* _My SQL Workbench_:
* * I have been using `(My-SQL-Workbench)` in order to create the connection to the database in `(DB-gate)` and implement the table and query for each table.
The configuration and setup have been worked out through the `(My-SQL-Workbench)` eviorment to make sure the `(CRUD)` query's is working for each table.
* _Dependency injection_:
* * Dependecy injection for `(JDBC = mysql-connector)`, `(junit = junit-jupiter-api)` , `(mockito = mockito-core)`.
* _JDBC_:
* * My next step was to set up the java program and implement the tables from the `(ER-diagrams)` and `(My-SQL-Workbench)` environment. To create the right classes and make sure the crud queries where working through java with the database.
* __:
* * My next step was to set up the java program and implement the tables from the `(ER-diagrams)` and `(My-SQL-Workbench)` environment. To create the right classes and make sure the `(CRUD)` queries where working through java with the database.
* _Test JUNIT/MOCKING_:
* * I did implement tests for `(CustomerMGR and MobileDevices)` for every `(CRUD)` methode.
* _Creation of the (AWS DB)_
* * The creation of the *AWS DB* in AWS cloud
* _Implemented AWS DataBase/Connection with JDBC_
* * The implementation through `(JDBC)` simple, the change was to implement a duplication of the `(URL,USERNAME,PASS)` but with different input gained access to the AWS database, crud was completed with `My SQL Workbench to make sure the connection was completed`.
- --
### Database structure
#####
* __:

assignment_mobile_reparation consists of three tables: customers, mobile_devices, and reparations. Here’s a brief description of each:

**customers**: This table stores information about customers. It has the following fields:
- `customer_id`: A unique identifier for each customer. It’s the primary key.
- `customer_name`: The name of the customer. This field is required.
- `customer_phone_number`: The phone number of the customer.
- `customer_address`: The address of the customer.

**mobile_devices**: This table stores information about mobile devices. It has the following fields:
- `mobile_device_id`: A unique identifier for each mobile device. It’s the primary key.
- `imei_number`: The International Mobile Equipment Identity (IMEI) number of the device. This field is required.
- `phone_brand`: The brand of the mobile device. This field is required.
- `model_number`: The model number of the mobile device. This field is required.

**reparations**: This table stores information about reparations. It has the following fields:
- `reparation_id`: A unique identifier for each reparation. It’s the primary key.
- `customer_id`: The ID of the customer who requested the reparation. This field is required and references the `customer_id` in the `customers` table.
- `mobile_device_id`: The ID of the mobile device to be repaired. This field is required and references the `mobile_device_id` in the `mobile_devices` table.
- `employee_first_name`, `employee_last_name`, `employee_number`: Information about the employee who is handling the reparation. These fields are required.
- `reparation_start_date`, `reparation_end_date`: The start and end dates of the reparation. These fields are required.
- `reparation_status`: The status of the reparation. This field is required.
- `reparation_description`: A description of the reparation. This field is required.
- `images`: Images related to the reparation.

The `reparations` table has two foreign keys, `customer_id` and `mobile_device_id`, which create relationships with the `customers` and `mobile_devices` tables, respectively. This means that each reparation is linked to a specific customer and a specific mobile device.


- --
### Functions
Expand Down
59 changes: 59 additions & 0 deletions src.uml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<Diagram>
<ID>JAVA</ID>
<OriginalElement>C:/githubRepos/assignmentMobileRepair/src</OriginalElement>
<nodes>
<node x="823.0" y="225.0">org.example.manager.ReparationsMGR</node>
<node x="-104.0" y="-14.0">org.example.models.Reparation</node>
<node x="587.0" y="-14.0">org.example.manager.DBConnectionBase_</node>
<node x="189.0" y="676.0">org.example.models.Customer</node>
<node x="479.0" y="676.0">MobileDevicesTest</node>
<node x="-104.0" y="1030.0">org.example.Main</node>
<node x="771.0" y="676.0">CustomerTest</node>
<node x="580.0" y="201.0">org.example.manager.CustomersMGR</node>
<node x="-104.0" y="676.0">org.example.models.MobileDevice</node>
<node x="315.0" y="201.0">org.example.manager.MobileDevicesMGR</node>
</nodes>
<notes />
<edges>
<edge source="org.example.manager.CustomersMGR" target="org.example.manager.DBConnectionBase_" relationship="GENERALIZATION">
<point x="0.0" y="-165.5" />
<point x="0.0" y="82.5" />
</edge>
<edge source="org.example.manager.ReparationsMGR" target="org.example.manager.DBConnectionBase_" relationship="GENERALIZATION">
<point x="0.0" y="-141.5" />
<point x="935.5" y="176.0" />
<point x="691.5" y="176.0" />
<point x="0.0" y="82.5" />
</edge>
<edge source="org.example.manager.MobileDevicesMGR" target="org.example.manager.DBConnectionBase_" relationship="GENERALIZATION">
<point x="0.0" y="-165.5" />
<point x="437.5" y="176.0" />
<point x="691.5" y="176.0" />
<point x="0.0" y="82.5" />
</edge>
</edges>
<settings layout="Hierarchic" zoom="0.443796835970025" showDependencies="false" x="472.0" y="576.5" />
<SelectedNodes>
<node>org.example.Main</node>
<node>MobileDevicesTest</node>
<node>CustomerTest</node>
<node>org.example.manager.MobileDevicesMGR</node>
<node>org.example.models.Reparation</node>
<node>org.example.manager.CustomersMGR</node>
<node>org.example.models.Customer</node>
<node>org.example.manager.DBConnectionBase_</node>
<node>org.example.manager.ReparationsMGR</node>
<node>org.example.models.MobileDevice</node>
</SelectedNodes>
<Categories>
<Category>Constructors</Category>
<Category>Fields</Category>
<Category>Inner Classes</Category>
<Category>Methods</Category>
<Category>Properties</Category>
</Categories>
<SCOPE>All</SCOPE>
<VISIBILITY>private</VISIBILITY>
</Diagram>

4 changes: 1 addition & 3 deletions src/main/java/org/example/Main.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.example;

import org.example.manager.CustomerDemo;
import org.example.manager.CustomersMGR;
import org.example.manager.MobileDevicesMGR;
import org.example.manager.ReparationsMGR;
Expand Down Expand Up @@ -50,8 +49,7 @@ private static void menuSelection(int selection) throws SQLException {
break;
case 3: reparationsMGR.crudReparationMenu();
break;
case 4:
CustomerDemo.customerMenu();



}
Expand Down
76 changes: 0 additions & 76 deletions src/main/java/org/example/manager/CustomerDemo.java

This file was deleted.

0 comments on commit e57b099

Please sign in to comment.