namespace MyOffice.Data.Models.Accounts; using Currencies; public enum AccountTypeEnum { debit, credit, transit, other, } public class Account { public Guid Id { get; set; } public string CurrencyGlobalId { get; set; } = null!; public CurrencyGlobal? CurrencyGlobal { get; set; } public string Name { get; set; } = null!; public AccountTypeEnum Type { get; set; } public IEnumerable? AccessRights { get; set; } public IEnumerable? Motions { get; set; } public IEnumerable? Categories { get; set; } } public class AccountDetailed { public Account Account { get; set; } = null!; public decimal TotalPlus { get; set; } public decimal TotalMinus { get; set; } public decimal Rest => TotalPlus - TotalMinus; } public struct AccountSimple { public Guid Id { get; set; } public string Name { get; set; } public string? CurrencyName { get; set; } public string? CurrencyShortName { get; set; } public decimal? CurrencyRate { get; set; } public int? CurrencyQuantity { get; set; } public decimal? TotalPlus { get; set; } public decimal? TotalMinus { get; set; } public decimal? Balance { get; set; } }