- Enthält detaillierte Schema-Zuordnung mit Validierungshinweisen für nullfähige Felder.
- Ermöglicht die Verfolgung von Dateimetadaten innerhalb des Workflow-Systems.
Introduces a new `StateHistory` property in the `PObject` class within `PObject.cs`. This property is decorated with the `[ForeignKey("ObjStateId")]` attribute and is of type `IEnumerable<PObjectStateHist>?`, allowing it to store a collection of `PObjectStateHist` objects. It is initialized to an empty array using `Array.Empty<PObjectStateHist>()`.
Introduced a mapping configuration in `MappingProfile` to map `PObjectStateHist` to `ObjectStateHistDto`, including the `Intl` property and an array of `Others`. Added a new record `ObjectStateHistDto` with properties for `Intl`, `Others`, `ChangedWho`, and `ChangedWhen`, initializing `Others` to an empty array of strings.
The `ToList()` method in the `PObjectStateHist` class has been removed. This method previously returned a list of strings, including the `IntlState` property of `State1` and other state properties (`State2`, `State3`, `State4`). Its removal indicates that this functionality is no longer needed or has been refactored.
The `ToList()` method in the `PObjectState` class has been removed. This method previously returned a list of strings, including the `IntlState` property of `State1` and other state properties (`State2`, `State3`, `State4`). Its removal indicates that this functionality is no longer needed or has been refactored.
Introduces the `PObjectStateHist` class in the `WorkFlow.Domain.Entities` namespace, mapped to the `TBMWF_PROFILE_OBJ_STATE_HISTORY` table. The class includes properties with data annotations for validation and schema mapping, addressing nullable fields treated as required in application logic. A `ToList()` method is added to return state-related strings, enhancing functionality.
Removed unused MediatR directive, added required ProfileId
property, and removed DialogNo from ButtonDto. Updated
ReadButtonRequest to inherit from IRequest<ButtonDto>
for MediatR integration.
- Removed `Id`, `Headlines`, and `States` from `ObjectDto`; added `State` property of type `ObjectStateDto?`.
- Completely removed `ProfileControlsTFDto` and `StateDto` classes.
- Removed `Id` from `ProfileDto`, keeping `TypeId` unchanged.
- Updated `MappingProfile` to remove mappings for `ProfileControlsTFDto` and `StateDto`, and changed mapping for `PControlsTF` to `PControlsTFDto`.
- Introduced new `ObjectStateDto` class with properties for `Intl`, `Others`, and a collection of `TFControls`.
- Added new `PControlsTFDto` class with various control attributes.
Removed ObjStateId and Id from ObjectDto for simplification.
Updated foreign key in PObjectState from ObjStateId to StateId,
and modified TFControls to support nullable collections.
Adjusted WFDBContext configuration for clearer foreign key
relationships and improved maintainability of the database schema.
Removed ProfileObjRepository and migrated its functionality to PObjectRepository. Updated DependencyInjection.cs to register the new repository for dependency injection, improving clarity and organization while maintaining existing functionality.
This commit includes a significant refactoring of the data model, renaming `ProfileObject` to `PObject` and `ProfileControlsTF` to `PControlsTF`.
Key changes:
- Updated `IProfileObjRepository` to reflect new entity names.
- Added `TFControls` property to `ObjectDto`.
- Adjusted `MappingProfile` for new entity mappings.
- Replaced `ProfileControlsTF` and `ProfileObjState` with `PControlsTF` and `PObjectState`.
- Updated `WFDBContext` with new DbSet properties for the renamed entities.
- Modified `ProfileObjRepository` to align with the new data structure.
These changes enhance clarity and maintainability across the application.
The `ProfileControlsTFDto` class has been changed from a record type to a class with auto-implemented properties, enhancing its structure and usability. Several properties have been renamed or removed, and new properties like `DialogNo`, `Text`, and `Icon` have been added.
In the `ProfileControlsTF` class, the `Sequ` property has been updated to remove its default value assignment, maintaining its nullable byte type.
Updated property names and foreign key references in
ProfileControlsTF and ProfileObjState classes to improve
database relationship integrity. Added TFControls collection
to ProfileObjState and modified queries in ProfileObjRepository
to include related entities. Established relationships in
WFDBContext with cascade delete behavior.
Updated the inclusion of the `States` property in the
`ReadAsync` method of `ProfileObjRepository` to check
for null values before accessing `State1`. This change
prevents potential null reference exceptions.
- Deleted the `ProfileObjStateDto` class and its `States` property.
- Removed mapping for `ProfileObjState` to `ProfileObjStateDto` in `MappingProfile`.
- Updated `States` mapping to handle null values by converting to a list or returning an empty array.
- Replaced `States` property in `ProfileObjState` with a `ToList()` method that aggregates state values.
Standardized namespaces for DTO classes and redefined several records to include necessary properties. Removed mapping configurations from MappingProfile, indicating a potential refactor. Introduced ProfileObjStateDto with a States property and ensured ProfileControlsTFDto and StateDto are properly encapsulated.
- Added `States` property to `ProfileObjStateDto` and `ObjectDto`.
- Updated `MappingProfile` to include new `States` mapping.
- Made `StateId` in `ProfileObjState` required and added `State1` navigation property.
- Changed `ProfileObject` to use `States` instead of `State`.
- Cleaned up `State` class structure and removed redundant namespaces.
- Updated `ProfileObjRepository` to fetch related state data.
Removed the State property from ProfileObjState and added
ChangedWho and ChangedWhen properties. Updated ProfileObject
to reference ProfileObjState instead of State. Modified
ProfileObjRepository to include the new State property
when querying ProfileObject instances.
- Changed properties from `init` to `set` for mutability.
- Updated `ProfileId`, `UserId`, `ObjId`, and `StateId` to nullable types.
- Added XML documentation for clarity on property usage.
- Reduced maximum length of `State2`, `State3`, and `State4` to 100 characters.
- Modified `AddedWho` to nullable with default value "SYS".
- Changed `AddedWhen` to nullable with default value of `DateTime.Now`.
- Introduced `ChangedWho` and `ChangedWhen` properties for tracking changes.
- Updated navigation properties to reflect new accessors.
Updated `ReadProfileHandler` to assign buttons directly to the `profile` object before mapping to `ProfileDto`. This ensures the `Buttons` property is populated correctly. Added a new `[NotMapped]` property `Buttons` of type `IEnumerable<Button>?` to the `Profile` class to hold associated buttons.
- Updated `ProfileController` to always return `Ok(profile)` instead of `NotFound()`.
- Changed `ReadProfileQuery` to return a non-nullable `ProfileDto`, throwing `NotFoundException` if not found.
- Modified `ReadProfileHandler` to handle the new return type and throw exceptions appropriately.
- Adjusted `ReadProfileAsync` to align with the new non-nullable return type.
- Added dependency on `DigitalData.Core.Exceptions` for improved error handling.