sync public allowlist from private myoffice

This commit is contained in:
myoffice-sync
2026-08-05 10:36:17 +00:00
parent 6f7fd61ee9
commit 874796c860
720 changed files with 2841 additions and 69563 deletions
@@ -1,36 +0,0 @@
namespace MyOffice.Web.Models.Currency;
using AutoMapper;
using MyOffice.Services.Currency.Domain;
public class CurrencyViewModel: BaseViewModel
{
public string Id { get; set; } = null!;
public string Code { get; set; } = null!;
public string Symbol { get; set; } = null!;
public string Name { get; set; } = null!;
public string ShortName { get; set; } = null!;
public decimal? Rate { get; set; }
public int? Quantity { get; set; }
public DateTime? RateDate { get; set; }
public bool IsPrimary { get; set; }
}
public class CurrencyViewModelProfile: Profile
{
public CurrencyViewModelProfile()
{
CreateMap<CurrencyDto, CurrencyViewModel>();
CreateMap<CurrencyWithRateDto, CurrencyViewModel>()
.ForMember(x => x.Id, o => o.MapFrom(x => x.Currency.Id))
.ForMember(x => x.Code, o => o.MapFrom(x => x.Currency.CurrencyGlobalId))
.ForMember(x => x.Name, o => o.MapFrom(x => x.Currency.Name))
.ForMember(x => x.ShortName, o => o.MapFrom(x => x.Currency.ShortName))
.ForMember(x => x.Rate, o => o.MapFrom(x => x.Rate == null ? (decimal?)null : x.Rate.Rate))
.ForMember(x => x.IsPrimary, o => o.MapFrom(x => x.Currency.IsPrimary))
.ForMember(x => x.Quantity, o => o.MapFrom(x => x.Rate == null ? (int?)null : x.Rate.Quantity))
.ForMember(x => x.RateDate, o => o.MapFrom(x => x.Rate == null ? (DateTime?)null : x.Rate.DateTime))
;
}
}