feat(ReadButton): add dto and handler

This commit is contained in:
tekh 2025-07-29 21:41:54 +02:00
parent 87857862e4
commit 559127a931
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,29 @@
using DigitalData.Core.Abstractions;
using MediatR;
namespace WorkFlow.Application.Buttons;
public record ButtonDto : IUnique<int>
{
public int Id { get; init; }
public required int ProfileId { get; init; }
public byte? DialogNo { get; init; }
public string? BtnType { get; init; }
public string? Icon { get; init; }
public string? ForeColor { get; init; }
public string? BackColor { get; init; }
public string? Command { get; init; }
public string? DialogCommand { get; init; }
public string? ConfirmationText { get; init; }
}
public record ReadButtonRequest : IRequest<ButtonDto>;

View File

@ -1,4 +1,5 @@
using AutoMapper;
using WorkFlow.Application.Buttons;
using WorkFlow.Application.DTO.Config;
using WorkFlow.Application.DTO.Profile;
using WorkFlow.Application.DTO.ProfileControlsTF;
@ -18,6 +19,7 @@ namespace WorkFlow.Application
CreateMap<ProfileControlsTF, ProfileControlsTFDto>();
CreateMap<ProfileObjState, ProfileObjStateDto>();
CreateMap<State, StateDto>();
CreateMap<Button, ButtonDto>();
// Mapping create-DTO to entity
CreateMap<ConfigCreateDto, Config>();