2021-06-06 12:02:18 +02:00
|
|
|
## Plugin materiels database
|
|
|
|
|
2021-06-06 12:10:58 +02:00
|
|
|
![img](./schema.png)
|
2021-06-06 12:02:18 +02:00
|
|
|
|
|
|
|
### Table plugin_materiels_category
|
|
|
|
| Idx | Field Name | Data Type |
|
|
|
|
|---|---|---|
|
|
|
|
| *🔑 ⬋ | id| integer autoincrement |
|
|
|
|
| *🔍 | name| varchar(100) |
|
|
|
|
| Indexes |
|
|
|
|
| 🔑 primary key | pk_plugin_materiels_category ||
|
|
|
|
| 🔍 unique | u_category_name |
|
|
|
|
|
|
|
|
### Table plugin_materiels_equipment
|
|
|
|
| Idx | Field Name | Data Type |
|
|
|
|
|---|---|---|
|
|
|
|
| *🔑 ⬋ | id| integer autoincrement |
|
|
|
|
| *⬈ | category_id| integer |
|
|
|
|
| *🔍 | designation| varchar(255) |
|
|
|
|
| Indexes |
|
|
|
|
| 🔑 primary key | pk_plugin_materiels_equipment || ON id|
|
|
|
|
| 🔍 unique | u_equipment_designation || ON designation|
|
|
|
|
| Foreign Keys |
|
|
|
|
| | Fk_plugin_materiels_equipment | ( category_id ) ref plugin_materiels_category (id) |
|
|
|
|
|
2021-09-02 15:24:41 +02:00
|
|
|
### Table plugin_materiels_movement
|
2021-06-06 12:02:18 +02:00
|
|
|
| Idx | Field Name | Data Type | Description |
|
|
|
|
|---|---|---|---|
|
|
|
|
| *🔑 | id| integer autoincrement | |
|
2021-09-02 15:24:41 +02:00
|
|
|
| *| side| boolean | 0 -> entry, 1 -> output |
|
2021-06-06 12:02:18 +02:00
|
|
|
| *| kind| varchar(20) | Achat, Don, Récupération, ... |
|
|
|
|
| *| equipment_number| integer | |
|
|
|
|
| *⬈ | equipment_id| integer | |
|
2021-09-02 15:24:41 +02:00
|
|
|
| *| mvt_date| date | |
|
2021-06-06 12:02:18 +02:00
|
|
|
| | additional_comment| varchar(255) | |
|
|
|
|
| Indexes |
|
2021-09-02 19:35:54 +02:00
|
|
|
| 🔑 primary key | pk_plugin_materiels_movement | |
|
2021-06-06 12:02:18 +02:00
|
|
|
| Foreign Keys |
|
2021-09-02 15:24:41 +02:00
|
|
|
| | Fk_plugin_materiels_movement | ( equipment_id ) ref plugin_materiels_equipment (id) | |
|
2021-06-06 12:02:18 +02:00
|
|
|
|
|
|
|
| * -> NOT NULL
|