Entfernen Sie die separate DTO-Ebene

This commit is contained in:
Developer 02 2024-07-01 12:05:03 +02:00
parent bce90dc00b
commit a21fcbf1d4
31 changed files with 0 additions and 456 deletions

View File

@ -1,7 +0,0 @@
namespace DigitalData.UserManager.DTO
{
public class Class1
{
}
}

View File

@ -1,4 +0,0 @@
namespace DigitalData.UserManager.Application.DTOs.Auth
{
public record AuthCheckDto (bool IsAuthenticated);
}

View File

@ -1,4 +0,0 @@
namespace DigitalData.UserManager.Application.DTOs.Auth
{
public record LogInDto(string Username, string Password);
}

View File

@ -1,28 +0,0 @@
namespace DigitalData.UserManager.Application.DTOs.Group
{
public record DirectoryGroupDto
(
IEnumerable<string> Samaccountname
//public string Name { get; set; }
//public string ObjectSid { get; set; }
//public string ObjectCategory { get; set; }
//public int SamAccountType { get; set; }
//public string DistinguishedName { get; set; }
//public int InstanceType { get; set; }
//public string CN { get; set; }
//public string ObjectClass { get; set; }
//public DateTime WhenChanged { get; set; }
//public Guid ObjectGuid { get; set; }
//public long UsnCreated { get; set; }
//public int? GroupType { get; set; }
//public DateTime? DsCorePropagationData { get; set; }
//public int? AdminCount { get; set; }
//public int? SystemFlags { get; set; }
//public string Member { get; set; }
//public string AdsPath { get; set; }
//public long UsnChanged { get; set; }
//public DateTime WhenCreated { get; set; }
//public string Description { get; set; }
//public bool? IsCriticalSystemObject { get; set; }
);
}

View File

@ -1,13 +0,0 @@
namespace DigitalData.UserManager.Application.DTOs.Group
{
public record GroupCreateDto
(
string? Name,
bool? AdSync,
bool? Internal,
bool? Active,
string? Comment,
string? AddedWho,
string? ChangedWho
);
}

View File

@ -1,14 +0,0 @@
namespace DigitalData.UserManager.Application.DTOs.Group
{
public record GroupReadDto
(
int Guid,
string? Name,
bool? AdSync,
bool? Internal,
bool? Active,
string? Comment,
string? AddedWho,
string? ChangedWho
);
}

View File

@ -1,13 +0,0 @@
namespace DigitalData.UserManager.Application.DTOs.Group
{
public record GroupUpdateDto
(
int Guid,
string? Name,
bool? AdSync,
bool? Internal,
bool? Active,
string? Comment,
string? ChangedWho
);
}

View File

@ -1,9 +0,0 @@
namespace DigitalData.UserManager.Application.DTOs.GroupOfUser
{
public record GroupOfUserCreateDto(
int UserId,
int GroupId,
string? Comment,
string? AddedWho
);
}

View File

@ -1,16 +0,0 @@
using DigitalData.UserManager.Application.DTOs.Group;
using DigitalData.UserManager.Application.DTOs.User;
namespace DigitalData.UserManager.Application.DTOs.GroupOfUser
{
public record GroupOfUserReadDto(
int Guid,
int UserId,
int GroupId,
string? Comment,
string AddedWho,
string? ChangedWho,
UserReadDto User,
GroupReadDto Group
);
}

View File

@ -1,10 +0,0 @@
namespace DigitalData.UserManager.Application.DTOs.GroupOfUser
{
public record GroupOfUserUpdateDto(
int Guid,
int? UserId,
int? GroupId,
string? Comment,
string? ChangedWho
);
}

View File

@ -1,8 +0,0 @@
namespace DigitalData.UserManager.Application.DTOs.Module
{
public record ModuleDto(
int Guid,
string? Name,
string? ShortName
);
}

View File

@ -1,10 +0,0 @@
namespace DigitalData.UserManager.Application.DTOs.ModuleOfUser
{
public record ModuleOfUserCreateDto(
int UserId,
int ModuleId,
bool IsAdmin,
string? Comment,
string? AddedWho
);
}

View File

@ -1,11 +0,0 @@
namespace DigitalData.UserManager.Application.DTOs.ModuleOfUser
{
public record ModuleOfUserReadDto(
int Guid,
int UserId,
int ModuleId,
string? Comment,
string? AddedWho,
string? ChangedWho
);
}

View File

@ -1,11 +0,0 @@
namespace DigitalData.UserManager.Application.DTOs.ModuleOfUser
{
public record ModuleOfUserUpdateDto(
int Guid,
int UserId,
int ModuleId,
bool? IsAdmin,
string? Comment,
string? ChangedWho
);
}

View File

@ -1,4 +0,0 @@
namespace DigitalData.UserManager.Application.DTOs
{
public record SearchRootCreateDto(string? DirEntryUsername, string DirEntryPassword);
}

View File

@ -1,18 +0,0 @@
namespace DigitalData.UserManager.Application.DTOs.User
{
public record class UserCreateDto
{
public string? Prename { get; init; }
public string? Name { get; init; }
public string? Username { get; init; }
public string? Shortname { get; init; }
public string? Email { get; init; }
public string Language { get; init; } = "de-DE";
public string? Comment { get; init; }
public bool? Deleted { get; init; }
public string DateFormat { get; init; } = "dd.MM.yyyy";
public string AddedWho { get; init; } = "DEFAULT";
public string? ChangedWho { get; init; }
public bool Active { get; init; } = true;
}
}

View File

@ -1,34 +0,0 @@
namespace DigitalData.UserManager.Application.DTOs.User
{
public record UserPrincipalDto
(
string SamAccountName,
string GivenName,
string? MiddleName,
string Surname,
string EmailAddress,
string? AddedWho,
string? DateFormat
// Guid Guid,
// string SId,
// string EmployeeId,
// string VoiceTelephoneNumber,
// DateTime? AccountExpirationDate,
// DateTime? AccountLockoutTime,
// bool AllowReversiblePasswordEncryption,
// int BadLogonCount,
// bool DelegationPermitted,
// bool? Enabled,
// string HomeDirectory,
// string HomeDrive,
// DateTime? LastBadPasswordAttempt,
// DateTime? LastLogon,
// DateTime? LastPasswordSet,
// bool PasswordNeverExpires,
// bool PasswordNotRequired,
// byte[] PermittedLogonTimes,
// bool SmartcardLogonRequired,
// bool UserCannotChangePassword
);
}

View File

@ -1,14 +0,0 @@
namespace DigitalData.UserManager.Application.DTOs.User
{
public record UserPrincipalReadDto
(
Guid Guid,
string SId,
string EmployeeId,
string SamAccountName,
string GivenName,
string MiddleName,
string Surname,
string EmailAddress
);
}

View File

@ -1,17 +0,0 @@
namespace DigitalData.UserManager.Application.DTOs.User
{
public record UserReadDto(
int Guid,
string? Prename,
string? Name,
string Username,
string? Shortname,
string? Email,
string Language,
string? Comment,
bool Deleted,
string DateFormat,
string AddedWho,
bool Active
);
}

View File

@ -1,18 +0,0 @@
namespace DigitalData.UserManager.Application.DTOs.User
{
public record UserUpdateDto(
int Guid,
string? Prename,
string? Name,
string? Username,
string? Shortname,
string? Email,
string? Language,
string? Comment,
bool? Deleted,
string? DateFormat,
string? AddedWho,
string? ChangedWho,
bool? Active
);
}

View File

@ -1,10 +0,0 @@
namespace DigitalData.UserManager.Application.DTOs.UserRep
{
public record UserRepCreateDto(
int UserId,
int? RepGroupId,
int RightGroupId,
string AddedWho,
int RepUserId
);
}

View File

@ -1,18 +0,0 @@
using DigitalData.UserManager.Application.DTOs.Group;
using DigitalData.UserManager.Application.DTOs.User;
namespace DigitalData.UserManager.Application.DTOs.UserRep
{
public record UserRepReadDto(
int Guid,
int UserId,
int? RepGroupId,
int RightGroupId,
string AddedWho,
int? RepUserId,
UserReadDto? User,
GroupReadDto? RepGroup,
GroupReadDto? RightGroup,
UserReadDto? RepUser
);
}

View File

@ -1,9 +0,0 @@
namespace DigitalData.UserManager.Application.DTOs.UserRep
{
public record UserRepUpdateDto(
int UserId,
int? RepGroupId,
int RightGroupId,
int RepUserId
);
}

View File

@ -1,9 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@ -1,14 +0,0 @@
using AutoMapper;
using DigitalData.UserManager.Application.DTOs.User;
namespace DigitalData.UserManager.Application.MappingProfiles
{
public class DirectoryMappingProfile : Profile
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>")]
public DirectoryMappingProfile()
{
//CreateMap<UserPrincipal, UserPrincipalDto>();
//CreateMap<UserPrincipal, UserPrincipalReadDto>();
}
}
}

View File

@ -1,27 +0,0 @@
using AutoMapper;
using DigitalData.UserManager.Application.DTOs.Group;
using DigitalData.UserManager.Domain.Entities;
namespace DigitalData.UserManager.Application.MappingProfiles
{
public class GroupMappingProfile : Profile
{
public GroupMappingProfile()
{
CreateMap<Group, GroupCreateDto>();
CreateMap<Group, GroupReadDto>();
CreateMap<Group, GroupUpdateDto>();
CreateMap<GroupCreateDto, Group>();
CreateMap<GroupReadDto, Group>();
CreateMap<GroupUpdateDto, Group>();
CreateMap<DirectoryGroupDto, Group>()
.ForMember(group => group.EcmFkId, opt => opt.MapFrom(adGroup => 1))
.ForMember(group => group.AdSync, opt => opt.MapFrom(adGroup => true))
.ForMember(group => group.Internal, opt => opt.MapFrom(adGroup => false))
.ForMember(group => group.Active, opt => opt.MapFrom(adGroup => true))
.ForMember(group => group.Name, opt => opt.MapFrom(adGroup => adGroup.Samaccountname.ElementAt(0)));
}
}
}

View File

@ -1,20 +0,0 @@
using AutoMapper;
using DigitalData.UserManager.Application.DTOs.GroupOfUser;
using DigitalData.UserManager.Domain.Entities;
namespace DigitalData.UserManager.Application.MappingProfiles
{
public class GroupOfUserMappingProfile : Profile
{
public GroupOfUserMappingProfile()
{
CreateMap<GroupOfUser, GroupOfUserCreateDto>();
CreateMap<GroupOfUser, GroupOfUserReadDto>();
CreateMap<GroupOfUser, GroupOfUserUpdateDto>();
CreateMap<GroupOfUserCreateDto, GroupOfUser>();
CreateMap<GroupOfUserReadDto, GroupOfUser>();
CreateMap<GroupOfUserUpdateDto, GroupOfUser>();
}
}
}

View File

@ -1,20 +0,0 @@
using AutoMapper;
using DigitalData.UserManager.Application.DTOs.Module;
using DigitalData.UserManager.Domain.Entities;
namespace DigitalData.UserManager.Application.MappingProfiles
{
public class ModuleMappingProfile : Profile
{
public ModuleMappingProfile()
{
CreateMap<Module, ModuleDto>();
CreateMap<Module, ModuleDto>();
CreateMap<Module, ModuleDto>();
CreateMap<ModuleDto, Module>();
CreateMap<ModuleDto, Module>();
CreateMap<ModuleDto, Module>();
}
}
}

View File

@ -1,20 +0,0 @@
using AutoMapper;
using DigitalData.UserManager.Application.DTOs.ModuleOfUser;
using DigitalData.UserManager.Domain.Entities;
namespace DigitalData.UserManager.Application.MappingProfiles
{
public class ModuleOfUserMappingProfile : Profile
{
public ModuleOfUserMappingProfile()
{
CreateMap<ModuleOfUser, ModuleOfUserCreateDto>();
CreateMap<ModuleOfUser, ModuleOfUserReadDto>();
CreateMap<ModuleOfUser, ModuleOfUserUpdateDto>();
CreateMap<ModuleOfUserCreateDto, ModuleOfUser>();
CreateMap<ModuleOfUserReadDto, ModuleOfUser>();
CreateMap<ModuleOfUserUpdateDto, ModuleOfUser>();
}
}
}

View File

@ -1,26 +0,0 @@
using AutoMapper;
using DigitalData.UserManager.Application.DTOs.User;
using DigitalData.UserManager.Domain.Entities;
namespace DigitalData.UserManager.Application.MappingProfiles
{
public class UserMappingProfile : Profile
{
public UserMappingProfile()
{
CreateMap<User, UserCreateDto>();
CreateMap<User, UserReadDto>();
CreateMap<User, UserUpdateDto>();
CreateMap<UserCreateDto, User>();
CreateMap<UserReadDto, User>();
CreateMap<UserUpdateDto, User>();
CreateMap<UserPrincipalDto, User>()
.ForMember(user => user.Name, opt => opt.MapFrom(upDto => upDto.Surname))
.ForMember(user => user.Prename, opt => opt.MapFrom(upDto => upDto.GivenName))
.ForMember(user => user.Username, opt => opt.MapFrom(upDto => upDto.SamAccountName))
.ForMember(user => user.Email, opt => opt.MapFrom(upDto => upDto.EmailAddress));
}
}
}

View File

@ -1,20 +0,0 @@
using AutoMapper;
using DigitalData.UserManager.Application.DTOs.UserRep;
using DigitalData.UserManager.Domain.Entities;
namespace DigitalData.UserManager.Application.MappingProfiles
{
public class UserRepMappingProfile : Profile
{
public UserRepMappingProfile()
{
CreateMap<UserRep, UserRepCreateDto>();
CreateMap<UserRep, UserRepReadDto>();
CreateMap<UserRep, UserRepUpdateDto>();
CreateMap<UserRepCreateDto, UserRep>();
CreateMap<UserRepReadDto, UserRep>();
CreateMap<UserRepUpdateDto, UserRep>();
}
}
}