fix
This commit is contained in:
@@ -8,8 +8,6 @@ public class AccountControllerProfile : Profile
|
||||
{
|
||||
public AccountControllerProfile()
|
||||
{
|
||||
CreateMap<MotionRequest, MotionAddUpdate>();
|
||||
|
||||
CreateMap<Motion, MotionViewModel>()
|
||||
.ForMember(x => x.Date, o => o.MapFrom(x => x.DateTime))
|
||||
.ForMember(x => x.Item, o => o.MapFrom(x => x.Item.ItemGlobal.Name))
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
namespace MyOffice.Web.Models.Motion;
|
||||
|
||||
using AutoMapper;
|
||||
using MyOffice.Services.Account.Domain;
|
||||
|
||||
public class MotionRequest
|
||||
{
|
||||
public DateTime Date { get; set; }
|
||||
@@ -10,4 +13,12 @@ public class MotionRequest
|
||||
public decimal? Plus { get; set; }
|
||||
public decimal? Minus { get; set; }
|
||||
public decimal? AmountBalancing { get; set; }
|
||||
}
|
||||
|
||||
public class MotionRequestProfile : Profile
|
||||
{
|
||||
public MotionRequestProfile()
|
||||
{
|
||||
CreateMap<MotionRequest, MotionAddUpdate>();
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,23 @@
|
||||
namespace MyOffice.Web.Models.Motion
|
||||
namespace MyOffice.Web.Models.Motion;
|
||||
|
||||
using AutoMapper;
|
||||
using MyOffice.Services.Account.Domain;
|
||||
|
||||
public class MotionViewModel : BaseViewModel
|
||||
{
|
||||
public class MotionViewModel: BaseViewModel
|
||||
{
|
||||
public string Id { get; set; } = null!;
|
||||
public DateTime Date { get; set; }
|
||||
public string AccountId { get; set; } = null!;
|
||||
public string Item { get; set; } = null!;
|
||||
public string? Description { get; set; }
|
||||
public decimal Plus { get; set; }
|
||||
public decimal Minus { get; set; }
|
||||
}
|
||||
public string Id { get; set; } = null!;
|
||||
public DateTime Date { get; set; }
|
||||
public string AccountId { get; set; } = null!;
|
||||
public string Item { get; set; } = null!;
|
||||
public string? Description { get; set; }
|
||||
public decimal Plus { get; set; }
|
||||
public decimal Minus { get; set; }
|
||||
}
|
||||
|
||||
public class MotionViewModelProfile : Profile
|
||||
{
|
||||
public MotionViewModelProfile()
|
||||
{
|
||||
CreateMap<MotionDto, MotionViewModel>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user