Skip to content

feat(backend): update Sati#1436

Open
xtiannyeto wants to merge 4 commits into
mainfrom
feature/1434-update-backend-regarding-new-form
Open

feat(backend): update Sati#1436
xtiannyeto wants to merge 4 commits into
mainfrom
feature/1434-update-backend-regarding-new-form

Conversation

@xtiannyeto

Copy link
Copy Markdown
Collaborator
  • Change Database structure, Model, entity
  • Add Monitor attributes
  • Implement SatiEntityMapper
  • getComputeSati use case which getSait or Create if is not iexisting
  • processAti save sati if changes

@xtiannyeto xtiannyeto linked an issue Jun 25, 2026 that may be closed by this pull request
5 tasks
@xtiannyeto xtiannyeto requested a review from lwih June 25, 2026 07:55
@tristanrobert

tristanrobert commented Jun 25, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for frontend

Status Category Percentage Covered / Total
🔵 Lines 65.27% (🎯 40%) 3094 / 4740
🔵 Statements 63.96% (🎯 40%) 3358 / 5250
🔵 Functions 55.48% (🎯 40%) 1072 / 1932
🔵 Branches 59.26% (🎯 40%) 1452 / 2450
File CoverageNo changed files found.
Generated in workflow #4544 for commit 73bfa04 by the Vitest Coverage Report Action

 - Change Database structure, Model, entity
 - Add Monitor attributes
 - Implement SatiEntityMapper
 - getComputeSati use case which getSait or Create if is not iexisting
 - processAti save sati if changes
@xtiannyeto xtiannyeto force-pushed the feature/1434-update-backend-regarding-new-form branch from 471fb79 to da4ac59 Compare June 25, 2026 08:29
@xtiannyeto xtiannyeto force-pushed the feature/1434-update-backend-regarding-new-form branch from da4ac59 to cd98bbc Compare June 25, 2026 08:42
 - update mapping attribute orphan
 - create a enable sati flag regarding the user service
@xtiannyeto xtiannyeto force-pushed the feature/1434-update-backend-regarding-new-form branch from 4397bc6 to ffa380a Compare June 26, 2026 13:44

import fr.gouv.dgampa.rapportnav.infrastructure.api.bff.model.v2.sati.Contact

data class SatiParty(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je suis pas sûr de vraiment comprendre le sens de Party. C'est quoi le mot en francais ?

Comment on lines +11 to +12
val createdAt: Instant? = null,
val updatedAt: Instant? = null

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Les champs d'audit, en général, je les remonte pas côté domain. Ils ont pas vraiment de business logic.
Par contre, je les remonte du Model vers le Admin type quand on les gère depuis l'admin panel

if (!action.actionType.toString().endsWith("_CONTROL")) return null
val sati = satiRepo.findByActionId(actionId = action.id.toString())
var sati = satiRepo.findByActionId(actionId = action.id.toString())
if (sati == null) sati = satiRepo.save(getNewSati(action = action))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok donc là, tu créés une row (par action) si elle existe pas encore, c'est ça ?


@Column(name = "zipcode", nullable = true, length = 20)
val zipcode: String? = null,
@Column(name = "full_address", length = 400)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fullAddress à 400 ? J'ai du mal à savoir si c'est suffisant ou pas

Comment on lines +38 to +39
@Column(name = "nationality", length = 16)
var nationality: String? = null,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Un countrycode alpha3 comme on utilise dans d'autres trucs, c'est pas suffisant ?

Comment on lines +36 to +37
@Column(name = "agent_id", length = 255)
var agentId: Int? = null,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

le "length" ici, tu peux enlever je pense

Comment on lines +42 to +48
@CreatedDate
@Column(name = "created_at", nullable = true, updatable = false)
var createdAt: Instant? = null,

@LastModifiedDate
@Column(name = "updated_at", nullable = true)
var updatedAt: Instant? = null,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

T'as aussi d'autres champs genre createdBy et updatedBy aussi si tu veux pour les audits

@MTES-MCT MTES-MCT deleted a comment from github-actions Bot Jun 26, 2026
@MTES-MCT MTES-MCT deleted a comment from github-actions Bot Jun 26, 2026
@MTES-MCT MTES-MCT deleted a comment from github-actions Bot Jun 26, 2026
@MTES-MCT MTES-MCT deleted a comment from github-actions Bot Jun 26, 2026
@xtiannyeto xtiannyeto force-pushed the feature/1434-update-backend-regarding-new-form branch from ffa380a to 73bfa04 Compare June 26, 2026 14:18
@github-actions

Copy link
Copy Markdown
Contributor
Overall Project 79.03% -1.65%
Files changed 74.59%

File Coverage
JPASatiRepository.kt 100% 🍏
SatiPartyEntity.kt 100% 🍏
AuthorityType.kt 100% 🍏
LogbookMessagePurpose.kt 100% 🍏
SatiEntityMapper.kt 98.44% -1.56% 🍏
MissionActionDataOutput.kt 97.9% -0.16% 🍏
MissionAction.kt 97.64% -0.37% 🍏
SatiJpeEntity.kt 97.44% -2.56% 🍏
SatiModelMapper.kt 96.13% -3.87% 🍏
SatiMapper.kt 95.79% -4.21% 🍏
ProcessSati.kt 95.35% -4.65%
SatiVesselEntity.kt 94.29% -5.71% 🍏
SatiParty.kt 93.94% -6.06% 🍏
ControlResourceEntity.kt 93.83% -6.17% 🍏
AddressEntity.kt 93.65% -6.35% 🍏
MissionFishAction.kt 92.72% 🍏
ControlResource.kt 92.59% -7.41% 🍏
SatiInspectorEntity.kt 91.18% -8.82% 🍏
ContactEntity.kt 85.71% -7.94%
SatiEntity.kt 76.92% -23.08%
SatiModuleType.kt 71.19% -28.81%
SatiModel.kt 67.78% -28.45%
SatiVesselModel.kt 63.33% -36.67%
SatiVessel.kt 50% -50%
SatiInspector.kt 50% -50%
SatiJpe.kt 50% -50%
SatiInspectorModel.kt 47.17% -52.83%
SatiPartyModel.kt 47.17% -52.83%
GetComputeSati.kt 37.75% -62.25%
AddressModel.kt 37.16% -62.84%
ContactModel.kt 37.16% -62.84%
EnableSati.kt 0%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update backend regarding new form

3 participants