-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add comments and control units and rename briefing to dashboard…
…_datas
- Loading branch information
1 parent
554ec8a
commit 077d70c
Showing
11 changed files
with
127 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...cacem/monitorenv/infrastructure/database/repositories/interfaces/IDBBriefingRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
package fr.gouv.cacem.monitorenv.infrastructure.database.repositories.interfaces | ||
|
||
import fr.gouv.cacem.monitorenv.infrastructure.database.model.BriefingModel | ||
import fr.gouv.cacem.monitorenv.infrastructure.database.model.DashboardDatasModel | ||
import org.springframework.data.jpa.repository.JpaRepository | ||
import java.util.UUID | ||
|
||
interface IDBBriefingRepository : JpaRepository<BriefingModel, UUID> { | ||
interface IDBBriefingRepository : JpaRepository<DashboardDatasModel, UUID> { | ||
fun deleteAllByDashboardId(dashboardId: UUID) | ||
} |
14 changes: 8 additions & 6 deletions
14
backend/src/main/resources/db/migration/internal/V0.154__create_dashboard_table.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,28 @@ | ||
CREATE TABLE dashboard | ||
( | ||
id uuid PRIMARY KEY, | ||
name VARCHAR(255) NOT NULL, | ||
geom geometry(geometry, 4326) NOT NULL | ||
id uuid PRIMARY KEY, | ||
name VARCHAR(255) NOT NULL, | ||
geom geometry(geometry, 4326) NOT NULL, | ||
comments VARCHAR(255) | ||
); | ||
|
||
CREATE TABLE briefing | ||
CREATE TABLE dashboard_datas | ||
( | ||
id uuid PRIMARY KEY, | ||
dashboard_id uuid NOT NULL, | ||
reportings_id integer, | ||
amp_cacem_id integer, | ||
regulations_cacem_id integer, | ||
vigilance_area_id integer, | ||
control_units_id integer, | ||
control_unit_id integer, | ||
--department code has 3 char max : https://www.insee.fr/fr/information/7766585 | ||
insee_code varchar(3), | ||
CONSTRAINT fk_dashboard_id FOREIGN KEY (dashboard_id) REFERENCES dashboard (id), | ||
CONSTRAINT fk_reportings FOREIGN KEY (reportings_id) REFERENCES reportings (id), | ||
CONSTRAINT fk_regulatory_cacem FOREIGN KEY (regulations_cacem_id) REFERENCES regulations_cacem (id), | ||
CONSTRAINT fk_vigilance_area FOREIGN KEY (vigilance_area_id) REFERENCES vigilance_areas (id), | ||
CONSTRAINT fk_control_units FOREIGN KEY (control_units_id) REFERENCES control_units (id) | ||
CONSTRAINT fk_control_units FOREIGN KEY (control_unit_id) REFERENCES control_units (id), | ||
CONSTRAINT fk_amp_cacem FOREIGN KEY (amp_cacem_id) REFERENCES amp_cacem (id) | ||
); | ||
|
||
|
Oops, something went wrong.