refactor: DataCategory N-N — remove modelId from charts and data models#713
refactor: DataCategory N-N — remove modelId from charts and data models#713SchroterQuentin wants to merge 3 commits intomainfrom
Conversation
Domain models: - ChartOperand: remove modelId, modelLabel - ChartModelLabel: delete file entirely - ChartInfos: remove modelsLabels (now on ChartOrganisation level) - ChartOrganisationInfos/TypeInfos: modelsLabels → models (ModelInfos[]) - DataCategoryInfos: modelId → applicationId + models (ModelInfos[]) - DataDefinitionInfos: remove modelId, add modelId to filters Components: - FSBaseChartOrganisationsList: modelsLabels → models - FSBaseChartOrganisationTypesList: modelsLabels → models - FSBaseChartsList: remove modelsLabels column (Charts no longer carry it)
There was a problem hiding this comment.
Pull request overview
Refactors chart/data-category/data-definition domain models to support a many-to-many relationship with models by removing modelId/modelsLabels from chart/data-definition payloads and centralizing model info via ModelInfos[], then updates list components accordingly.
Changes:
- Remove
ChartModelLabelandmodelsLabelsusage from chart domain models and charts list UI. - Replace
modelsLabelswithmodels: ModelInfos[]onChartOrganisationInfosandChartOrganisationTypeInfos. - Update
DataCategoryInfosto useapplicationId+models, and adjustDataDefinitionInfos/filters to removemodelIdfrom DTO and add filtering capability.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/core/foundation-core-domain/models/dataDefinitions/dataDefinitionInfos.ts | Removes modelId from infos/DTO; adds modelId to filters. |
| src/core/foundation-core-domain/models/dataCategories/dataCategoryInfos.ts | Replaces modelId with applicationId and adds models: ModelInfos[]. |
| src/core/foundation-core-domain/models/charts/index.ts | Removes barrel export of deleted ChartModelLabel. |
| src/core/foundation-core-domain/models/charts/chartOperand.ts | Removes modelId/modelLabel from operand DTOs and model. |
| src/core/foundation-core-domain/models/charts/chartModelLabel.ts | Deletes ChartModelLabel model. |
| src/core/foundation-core-domain/models/charts/chartInfos.ts | Removes modelsLabels from chart infos/DTO. |
| src/core/foundation-core-domain/models/chartOrganisations/chartOrganisationInfos.ts | Renames modelsLabels → models using ModelInfos[]. |
| src/core/foundation-core-domain/models/chartOrganisationTypes/chartOrganisationTypeInfos.ts | Renames modelsLabels → models using ModelInfos[]. |
| src/core/foundation-core-components/components/lists/charts/FSBaseChartsList.vue | Removes models column rendering and switches internal mapping/options to models. |
| src/core/foundation-core-components/components/lists/chartOrganisations/FSBaseChartOrganisationsList.vue | Updates slot + filters to use item.models. |
| src/core/foundation-core-components/components/lists/chartOrganisationTypes/FSBaseChartOrganisationTypesList.vue | Updates slot + filters to use item.models. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| export interface DataDefinitionFilters { | ||
| modelsIds?: string[] | null; | ||
| modelId?: string | null; | ||
| dataCategoryId?: string | null; | ||
| dataTable?: DataTable | null; | ||
| search?: string | null; |
There was a problem hiding this comment.
DataDefinitionFilters now exposes both modelsIds and modelId. Without an explicit contract, it's unclear how callers/backends should behave when both are provided (or which one is preferred). Consider deprecating one, renaming for clarity (e.g., singular vs plural), or documenting/encoding precedence to avoid ambiguous API usage.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
DataCategoryFilters: modelId → modelsIds (string array) to match the backend core filter which accepts a list. DataDefinitionFilters: remove redundant modelId (only modelsIds).
Domain models:
Components: