Entfernen Sie die separate DTO-Ebene
This commit is contained in:
parent
bce90dc00b
commit
a21fcbf1d4
@ -1,7 +0,0 @@
|
||||
namespace DigitalData.UserManager.DTO
|
||||
{
|
||||
public class Class1
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,4 +0,0 @@
|
||||
namespace DigitalData.UserManager.Application.DTOs.Auth
|
||||
{
|
||||
public record AuthCheckDto (bool IsAuthenticated);
|
||||
}
|
||||
@ -1,4 +0,0 @@
|
||||
namespace DigitalData.UserManager.Application.DTOs.Auth
|
||||
{
|
||||
public record LogInDto(string Username, string Password);
|
||||
}
|
||||
@ -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; }
|
||||
);
|
||||
}
|
||||
@ -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
|
||||
);
|
||||
}
|
||||
@ -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
|
||||
);
|
||||
}
|
||||
@ -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
|
||||
);
|
||||
}
|
||||
@ -1,9 +0,0 @@
|
||||
namespace DigitalData.UserManager.Application.DTOs.GroupOfUser
|
||||
{
|
||||
public record GroupOfUserCreateDto(
|
||||
int UserId,
|
||||
int GroupId,
|
||||
string? Comment,
|
||||
string? AddedWho
|
||||
);
|
||||
}
|
||||
@ -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
|
||||
);
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
namespace DigitalData.UserManager.Application.DTOs.GroupOfUser
|
||||
{
|
||||
public record GroupOfUserUpdateDto(
|
||||
int Guid,
|
||||
int? UserId,
|
||||
int? GroupId,
|
||||
string? Comment,
|
||||
string? ChangedWho
|
||||
);
|
||||
}
|
||||
@ -1,8 +0,0 @@
|
||||
namespace DigitalData.UserManager.Application.DTOs.Module
|
||||
{
|
||||
public record ModuleDto(
|
||||
int Guid,
|
||||
string? Name,
|
||||
string? ShortName
|
||||
);
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
namespace DigitalData.UserManager.Application.DTOs.ModuleOfUser
|
||||
{
|
||||
public record ModuleOfUserCreateDto(
|
||||
int UserId,
|
||||
int ModuleId,
|
||||
bool IsAdmin,
|
||||
string? Comment,
|
||||
string? AddedWho
|
||||
);
|
||||
}
|
||||
@ -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
|
||||
);
|
||||
}
|
||||
@ -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
|
||||
);
|
||||
}
|
||||
@ -1,4 +0,0 @@
|
||||
namespace DigitalData.UserManager.Application.DTOs
|
||||
{
|
||||
public record SearchRootCreateDto(string? DirEntryUsername, string DirEntryPassword);
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
@ -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
|
||||
);
|
||||
|
||||
}
|
||||
@ -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
|
||||
);
|
||||
}
|
||||
@ -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
|
||||
);
|
||||
}
|
||||
@ -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
|
||||
);
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
namespace DigitalData.UserManager.Application.DTOs.UserRep
|
||||
{
|
||||
public record UserRepCreateDto(
|
||||
int UserId,
|
||||
int? RepGroupId,
|
||||
int RightGroupId,
|
||||
string AddedWho,
|
||||
int RepUserId
|
||||
);
|
||||
}
|
||||
@ -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
|
||||
);
|
||||
}
|
||||
@ -1,9 +0,0 @@
|
||||
namespace DigitalData.UserManager.Application.DTOs.UserRep
|
||||
{
|
||||
public record UserRepUpdateDto(
|
||||
int UserId,
|
||||
int? RepGroupId,
|
||||
int RightGroupId,
|
||||
int RepUserId
|
||||
);
|
||||
}
|
||||
@ -1,9 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@ -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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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>();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user