refactor(core): DTOs und Services an Core 2.0.0.0 angepasst

This commit is contained in:
Developer 02
2024-09-20 00:53:28 +02:00
parent 8d88148b98
commit 9458ffae42
17 changed files with 39 additions and 44 deletions

View File

@@ -1,9 +1,14 @@
namespace DigitalData.UserManager.Application.DTOs.Base
using DigitalData.Core.Abstractions;
namespace DigitalData.UserManager.Application.DTOs.Base
{
public record BaseUpdateDto()
public record BaseUpdateDto() : IUnique<int>
{
public string ChangedWho { get; set; } = "UNAUTHORIZED";
public DateTime ChangedWhen { get; set; } = DateTime.Now;
public int Id { get; init; }
}
}

View File

@@ -4,12 +4,10 @@ namespace DigitalData.UserManager.Application.DTOs.Group
{
public record GroupUpdateDto
(
int Id,
string? Name,
bool? AdSync,
bool? Internal,
bool? Active,
string? Comment,
string? ChangedWho
string? Comment
) : BaseUpdateDto();
}

View File

@@ -3,7 +3,6 @@
namespace DigitalData.UserManager.Application.DTOs.GroupOfUser
{
public record GroupOfUserUpdateDto(
int Id,
int? UserId,
int? GroupId,
string? Comment

View File

@@ -1,8 +1,10 @@
namespace DigitalData.UserManager.Application.DTOs.Module
using DigitalData.Core.Abstractions;
namespace DigitalData.UserManager.Application.DTOs.Module
{
public record ModuleDto(
int Id,
string? Name,
string? ShortName
);
) : IUnique<int>;
}

View File

@@ -1,4 +1,6 @@
namespace DigitalData.UserManager.Application.DTOs.ModuleOfUser
using DigitalData.Core.Abstractions;
namespace DigitalData.UserManager.Application.DTOs.ModuleOfUser
{
public record ModuleOfUserUpdateDto(
int Id,
@@ -7,5 +9,5 @@
bool? IsAdmin,
string? Comment,
string? ChangedWho
);
) : IUnique<int>;
}

View File

@@ -3,7 +3,6 @@
namespace DigitalData.UserManager.Application.DTOs.User
{
public record UserUpdateDto(
int Id,
string? Prename,
string? Name,
string? Username,
@@ -13,7 +12,6 @@ namespace DigitalData.UserManager.Application.DTOs.User
string? Comment,
bool? Deleted,
string? DateFormat,
bool? Active,
string AddedWho
bool? Active
) : BaseUpdateDto();
}
}