TekH a3cbe69fd6 Refactor data model: rename entities and update mappings
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.
2025-08-01 12:02:34 +02:00

23 lines
1.2 KiB
C#

using WorkFlow.Domain.Entities;
namespace WorkFlow.Application.Contracts.Repositories;
/// <summary>
/// Repository for retrieving <see cref="PObject"/> entities from the database.
/// </summary>
public interface IProfileObjRepository
{
/// <summary>
/// Retrieves the list of <see cref="PObject"/> associated with a given user ID and profile ID by calling a database function.
/// </summary>
/// <param name="userId">The unique identifier of the user whose profile is to be retrieved.</param>
/// <param name="profileId">The unique identifier of the profile whose object is to be retrieved.</param>
/// <param name="cancel">Propagates notification that operations should be canceled.</param>
/// <returns>
/// A task that represents the asynchronous operation. The task result contains the <see cref="PObject"/> object if found; otherwise, <c>null</c>.
/// </returns>
/// <remarks>
/// Logs an error if no profile is found, or if multiple profiles are returned, indicating potential data issues.
/// </remarks>
public Task<IEnumerable<PObject>> ReadAsync(int userId, int profileId, CancellationToken cancel = default);
}