-
Notifications
You must be signed in to change notification settings - Fork 4
feat(breaking): Remove timestamps from Localization(Set) #2272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 Walkthrough## Walkthrough
This change removes timestamp properties (`CreatedAt`, `UpdatedAt`) from localization-related domain entities and database tables, and updates the ordering of localization collections in queries to use only `LanguageCode`. Several domain entities now explicitly implement identity and creation interfaces. A migration is added to drop the timestamp columns from the database schema.
## Changes
| Files/Paths (grouped) | Change Summary |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `src/Digdir.Domain.Dialogporten.Application/Features/V1/.../DialogTransmissions/Queries/Search/SearchTransmissionQuery.cs`<br>`.../Dialogs/Queries/Get/GetDialogQuery.cs` | Changed ordering of `Localizations` in Entity Framework queries from `CreatedAt, LanguageCode` to only `LanguageCode` for relevant navigation properties. No other logic changes. |
| `src/Digdir.Domain.Dialogporten.Domain/Localizations/Localization.cs` | Removed `IJoinEntity` interface implementation and the `CreatedAt` and `UpdatedAt` properties from the `Localization` class. |
| `src/Digdir.Domain.Dialogporten.Domain/Localizations/LocalizationSet.cs` | `LocalizationSet` now implements `IIdentifiableEntity` (in addition to `IImmutableEntity`). Removed the `CreatedAt` property. Added relevant import. |
| `src/Digdir.Domain.Dialogporten.Infrastructure/Persistence/Migrations/20250508123435_RemoveTimestampsFromLocalizations.cs` | Added migration to remove `CreatedAt` from `LocalizationSet` table and both `CreatedAt` and `UpdatedAt` from `Localization` table. The `Down` method restores these columns with default UTC timestamps. |
| `src/Digdir.Domain.Dialogporten.Domain/Actors/ActorName.cs` | `ActorName` now implements `IIdentifiableEntity` and `ICreatableEntity` in addition to `IImmutableEntity`. Explicitly includes `Id` and `CreatedAt` properties. |
| `src/Digdir.Domain.Dialogporten.Domain/DialogEndUserContexts/Entities/LabelAssignmentLog.cs` | `LabelAssignmentLog` now implements `IIdentifiableEntity` and `ICreatableEntity` in addition to `IImmutableEntity`. No other changes. |
| `src/Digdir.Domain.Dialogporten.Domain/Dialogs/Entities/Activities/DialogActivity.cs` | `DialogActivity` now explicitly implements `IIdentifiableEntity` and `ICreatableEntity` in addition to existing interfaces. No other logic changes. |
| `src/Digdir.Domain.Dialogporten.Domain/Dialogs/Entities/DialogSearchTag.cs` | `DialogSearchTag` now implements `IIdentifiableEntity` and `ICreatableEntity` in addition to `IImmutableEntity`. Explicitly declares `Id` and `CreatedAt` properties. |
| `src/Digdir.Domain.Dialogporten.Domain/Dialogs/Entities/DialogSeenLog.cs` | `DialogSeenLog` now implements `IIdentifiableEntity` and `ICreatableEntity` in addition to `IImmutableEntity`. Explicitly declares `Id` and `CreatedAt` properties. |
| `src/Digdir.Library.Entity.Abstractions/Features/Immutable/IImmutableEntity.cs` | `IImmutableEntity` interface no longer inherits from `IIdentifiableEntity` and `ICreatableEntity`; now a marker interface only. Updated XML documentation and removed unused `using` directives. |
| `src/Digdir.Domain.Dialogporten.Domain/Dialogs/Entities/Transmissions/DialogTransmission.cs` | `DialogTransmission` now implements `IIdentifiableEntity` and `ICreatableEntity` in addition to existing interfaces. Added relevant using directives. No other changes. |
## Suggested reviewers
- oskogstad Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. 📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (2)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Description
This removes the unused/redundant timestamp columns from LocalizationSet and Localizations, saving significant amount of data.
Related Issue(s)
Verification