70 lines
1.8 KiB
C#
70 lines
1.8 KiB
C#
namespace MyOffice.Data.Models.Account;
|
|
|
|
using MyOffice.Data.Models.Users;
|
|
|
|
public class CurrencyGlobal
|
|
{
|
|
public string Id { get; set; }
|
|
public string Name { get; set; }
|
|
public string ShortName { get; set; }
|
|
public IEnumerable<Currency>? Currencies { get; set; }
|
|
public IEnumerable<Account>? Accounts { get; set; }
|
|
}
|
|
|
|
public class Currency
|
|
{
|
|
public Guid Id { get; set; }
|
|
public string CurrencyGlobalId { get; set; }
|
|
public CurrencyGlobal? CurrencyGlobal { get; set; }
|
|
public Guid UserId { get; set; }
|
|
public User? User { get; set; }
|
|
|
|
public string Name { get; set; }
|
|
public string ShortName { get; set; }
|
|
public IEnumerable<CurrencyRate>? Rates { get; set; }
|
|
}
|
|
|
|
public class CurrencyRate
|
|
{
|
|
public int Id { get; set; }
|
|
public Guid CurrencyId { get; set; }
|
|
public Currency? Currency { get; set; }
|
|
public DateTime DateTime { get; set; }
|
|
public decimal Rate { get; set; }
|
|
}
|
|
|
|
public class Account
|
|
{
|
|
public Guid Id { get; set; }
|
|
public string CurrencyGlobalId { get; set; }
|
|
public CurrencyGlobal? CurrencyGlobal { get; set; }
|
|
public string Name { get; set; }
|
|
public IEnumerable<AccountAccess> AccessRights { get; set; }
|
|
public IEnumerable<AccountMotion> Motions { get; set; }
|
|
}
|
|
|
|
public class AccountAccess
|
|
{
|
|
public int Id { get; set; }
|
|
public Guid AccountId { get; set; }
|
|
public Account? Account { get; set; }
|
|
public Guid UserId { get; set; }
|
|
public User? User { get; set; }
|
|
|
|
public bool IsAllowRead { get; set; }
|
|
public bool IsAllowWrite { get; set; }
|
|
public bool IsAllowManage { get; set; }
|
|
}
|
|
|
|
public class AccountMotion
|
|
{
|
|
public long Id { get; set; }
|
|
public DateTime CreatedOn { get; set; }
|
|
public DateTime DateTime { get; set; }
|
|
public Guid AccountId { get; set; }
|
|
public Account? Account { get; set; }
|
|
public Guid UserId { get; set; }
|
|
public User? User { get; set; }
|
|
public decimal AmountIn { get; set; }
|
|
public decimal AmountOut { get; set; }
|
|
} |