Publish from private repository
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
namespace MyOffice.Web.Models.Motion;
|
||||
|
||||
using AutoMapper;
|
||||
using Data.Models.Accounts;
|
||||
using Services.Account.Domain;
|
||||
|
||||
public class AccountControllerProfile : Profile
|
||||
{
|
||||
public AccountControllerProfile()
|
||||
{
|
||||
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))
|
||||
.ForMember(x => x.Plus, o => o.MapFrom(x => x.AmountPlus))
|
||||
.ForMember(x => x.Minus, o => o.MapFrom(x => x.AmountMinus))
|
||||
;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
namespace MyOffice.Web.Models.Motion;
|
||||
|
||||
using AutoMapper;
|
||||
using MyOffice.Services.Account.Domain;
|
||||
|
||||
public class MotionRequest
|
||||
{
|
||||
public DateTime Date { get; set; }
|
||||
public string Item { get; set; } = null!;
|
||||
public string? ItemId { get; set; } = null!;
|
||||
public string? AccountId { get; set; } = null!;
|
||||
public string? Description { get; set; }
|
||||
public decimal? Plus { get; set; }
|
||||
public decimal? Minus { get; set; }
|
||||
public decimal? AmountBalancing { get; set; }
|
||||
}
|
||||
|
||||
public class MotionRequestProfile : Profile
|
||||
{
|
||||
public MotionRequestProfile()
|
||||
{
|
||||
CreateMap<MotionRequest, MotionAddUpdate>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
namespace MyOffice.Web.Models.Motion;
|
||||
|
||||
using AutoMapper;
|
||||
using MyOffice.Services.Account.Domain;
|
||||
|
||||
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 class MotionViewModelProfile : Profile
|
||||
{
|
||||
public MotionViewModelProfile()
|
||||
{
|
||||
CreateMap<MotionDto, MotionViewModel>()
|
||||
.ForMember(x => x.Item, x => x.MapFrom(m => m.Item.Name))
|
||||
.ForMember(x => x.Minus, x => x.MapFrom(m => m.AmountMinus))
|
||||
.ForMember(x => x.Plus, x => x.MapFrom(m => m.AmountPlus))
|
||||
;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user