sync full source from private myoffice

This commit is contained in:
myoffice-sync
2026-08-05 10:55:09 +00:00
parent 874796c860
commit 405abdfe69
714 changed files with 70352 additions and 234 deletions
@@ -0,0 +1,19 @@
namespace MyOffice.Web.Models.Currency
{
public class CurrencyAddModel
{
public string Id { get; set; } = null!;
public string Name { get; set; } = null!;
public string ShortName { get; set; } = null!;
public int Quantity { get; set; }
public decimal Rate { get; set; }
public DateTime RateDate { get; set; }
}
public class CurrencyRateModel
{
public int Quantity { get; set; }
public decimal Rate { get; set; }
public DateTime RateDate { get; set; }
}
}
@@ -0,0 +1,11 @@
namespace MyOffice.Web.Models.Currency;
public class CurrencyEditModel
{
public string Name { get; set; } = null!;
public string ShortName { get; set; } = null!;
public int Quantity { get; set; }
public decimal Rate { get; set; }
public DateTime RateDate { get; set; }
public bool IsPrimary { get; set; }
}
@@ -0,0 +1,22 @@
/// <see cref="MyOffice.Data.Models.Currencies.CurrencyGlobal"/>
/// <see cref="MyOffice.Services.Currency.Domain.CurrencyGlobalDto"/>
namespace MyOffice.Web.Models.Currency;
using AutoMapper;
using MyOffice.Services.Currency.Domain;
public class CurrencyGlobalViewModel: IResponseModel
{
public string Id { get; set; } = null!;
public string Name { get; set; } = null!;
public int Quantity { get; set; }
public string Symbol { get; set; } = null!;
}
public class CurrencyGlobalViewModelProfile : Profile
{
public CurrencyGlobalViewModelProfile()
{
CreateMap<CurrencyGlobalDto, CurrencyGlobalViewModel>();
}
}
@@ -0,0 +1,20 @@
namespace MyOffice.Web.Models.Currency;
using AutoMapper;
using MyOffice.Services.Currency.Domain;
public class CurrencyRateViewModel: BaseViewModel
{
public string Currency { get; set; } = null!;
public DateTime DateTime { get; set; }
public int Quantity { get; set; }
public decimal Rate { get; set; }
}
public class CurrencyRateViewModelProfile: Profile
{
public CurrencyRateViewModelProfile()
{
CreateMap<CurrencyRateDto, CurrencyRateViewModel>();
}
}
@@ -0,0 +1,36 @@
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))
;
}
}