feat: Basis-DTOs, Service und Controller für automatische Metadatenverwaltung hinzugefügt
- Basis-DTOs für Lese-, Erstellungs- und Aktualisierungsvorgänge erstellt, um die Felder "hinzugefügt von", "hinzugefügt am", "geändert von" und "geändert am" automatisch über Middleware zu ergänzen. - Diese Basiskomponenten in die Gruppenstruktur integriert.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
namespace DigitalData.UserManager.Application.DTOs.Base
|
||||
{
|
||||
public record BaseCreateDto()
|
||||
{
|
||||
public string AddedWho { get; set; } = "UNAUTHORIZED";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
using DigitalData.Core.DTO;
|
||||
|
||||
namespace DigitalData.UserManager.Application.DTOs.Base
|
||||
{
|
||||
public record BaseReadDto(int Id, string? AddedWho, DateTime? AddedWhen, string? ChangedWho, DateTime? ChangedWhen) : BaseDTO<int>(Id);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace DigitalData.UserManager.Application.DTOs.Base
|
||||
{
|
||||
public record BaseUpdateDto()
|
||||
{
|
||||
public string ChangedWho { get; set; } = "UNAUTHORIZED";
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace DigitalData.UserManager.Application.DTOs.Group
|
||||
using DigitalData.UserManager.Application.DTOs.Base;
|
||||
|
||||
namespace DigitalData.UserManager.Application.DTOs.Group
|
||||
{
|
||||
public record GroupCreateDto
|
||||
(
|
||||
@@ -7,8 +9,6 @@
|
||||
bool? Internal,
|
||||
bool? Active,
|
||||
string? Comment,
|
||||
string? AddedWho,
|
||||
string? ChangedWho,
|
||||
int EcmFkId
|
||||
);
|
||||
) : BaseCreateDto();
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace DigitalData.UserManager.Application.DTOs.Group
|
||||
using DigitalData.UserManager.Application.DTOs.Base;
|
||||
|
||||
namespace DigitalData.UserManager.Application.DTOs.Group
|
||||
{
|
||||
public record GroupReadDto
|
||||
(
|
||||
@@ -9,6 +11,8 @@
|
||||
bool? Active,
|
||||
string? Comment,
|
||||
string? AddedWho,
|
||||
string? ChangedWho
|
||||
);
|
||||
DateTime? AddedWhen,
|
||||
string? ChangedWho,
|
||||
DateTime? ChangedWhen
|
||||
) : BaseReadDto(Id, AddedWho, AddedWhen, ChangedWho, ChangedWhen);
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace DigitalData.UserManager.Application.DTOs.Group
|
||||
using DigitalData.UserManager.Application.DTOs.Base;
|
||||
|
||||
namespace DigitalData.UserManager.Application.DTOs.Group
|
||||
{
|
||||
public record GroupUpdateDto
|
||||
(
|
||||
@@ -9,5 +11,5 @@
|
||||
bool? Active,
|
||||
string? Comment,
|
||||
string? ChangedWho
|
||||
);
|
||||
) : BaseUpdateDto();
|
||||
}
|
||||
Reference in New Issue
Block a user