Publish from private repository

This commit is contained in:
Gitea Actions
2026-08-01 12:08:49 +00:00
commit 6f7fd61ee9
695 changed files with 69563 additions and 0 deletions
+51
View File
@@ -0,0 +1,51 @@
namespace MyOffice.Data.Models.Accounts;
using Currencies;
using MyOffice.Core;
using MyOffice.Data.Models.Users;
public class Account: IDataModel
{
public Guid Id { get; set; }
public string CurrencyGlobalId { get; set; } = null!;
public CurrencyGlobal? CurrencyGlobal { get; set; }
public Guid? OwnerId { get; set; }
public User? Owner { get; set; }
public string Name { get; set; } = null!;
public IEnumerable<AccountAccess>? AccessRights { get; set; }
public IEnumerable<Motion>? Motions { get; set; }
public IEnumerable<AccountAccountCategory>? Categories { get; set; }
public IEnumerable<AccountAccessInvite>? Invites { get; set; }
}
public class AccountDetailed: IDataModel
{
public Account Account { get; set; } = null!;
public decimal TotalPlus { get; set; }
public decimal TotalMinus { get; set; }
public decimal Rest => TotalPlus - TotalMinus;
}
public class AccountSimple
{
public Guid Id { get; set; }
public string Name { get; set; } = null!;
public AccountAccessTypeEnum Type { 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; }
}
public class MotionTotalSimple
{
public Guid? Id { get; set; }
public string Name { get; set; } = null!;
public string CurrencyId { get; set; } = null!;
public string CurrencyName { get; set; } = null!;
public decimal CurrencyRate { get; set; }
public decimal Amount { get; set; }
}
@@ -0,0 +1,28 @@
namespace MyOffice.Data.Models.Accounts;
using MyOffice.Data.Models.Users;
public enum AccountAccessTypeEnum
{
balance,
credit,
external,
other,
}
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 Guid OwnerId { get; set; }
public User? Owner { get; set; }
public bool IsAllowRead { get; set; }
public bool IsAllowWrite { get; set; }
public bool IsAllowManage { get; set; }
public AccountAccessTypeEnum Type { get; set; }
public string? Name { get; set; }
}
@@ -0,0 +1,17 @@
namespace MyOffice.Data.Models.Accounts;
using Users;
public class AccountAccessInvite
{
public Guid Id { get; set; }
public Guid UserId { get; set; }
public User? User { get; set; }
public Guid AccountId { get; set; }
public Account? Account { get; set; }
public DateTime CreatedOn { get; set; }
public DateTime? AcceptedOn { get; set; }
public DateTime? RejectedOn { get; set; }
public string Email { get; set; } = null!;
public bool IsAllowWrite { get; set; }
}
@@ -0,0 +1,10 @@
namespace MyOffice.Data.Models.Accounts;
public class AccountAccountCategory
{
public int Id { get; set; }
public Guid AccountId { get; set; }
public Account Account { get; set; } = null!;
public Guid CategoryId { get; set; }
public AccountCategory Category { get; set; } = null!;
}
@@ -0,0 +1,12 @@
namespace MyOffice.Data.Models.Accounts;
using MyOffice.Data.Models.Users;
public class AccountCategory
{
public Guid Id { get; set; }
public Guid UserId { get; set; }
public User? User { get; set; }
public string Name { get; set; } = null!;
public IEnumerable<AccountAccountCategory>? Accounts { get; set; }
}
@@ -0,0 +1,10 @@
namespace MyOffice.Data.Models.Accounts.Domain;
using Currencies;
public class AccountWithRate
{
public Account Account { get; set; } = null!;
public Currency? Currency { get; set; }
public CurrencyRate? Rate { get; set; }
}
+22
View File
@@ -0,0 +1,22 @@
namespace MyOffice.Data.Models.Accounts;
using Items;
/// <summary>
/// Account motion
/// DateTime: 2023-01-01, Account: 'Debit card', Item.ItemGlobal: 'Primary salary', AmountPlus: 5000
/// </summary>
public class Motion
{
public Guid Id { get; set; }
public DateTime CreatedOn { get; set; }
public DateTime DateTime { get; set; }
public Guid AccountId { get; set; }
public Account Account { get; set; } = null!;
public int ItemId { get; set; }
public Item Item { get; set; } = null!;
public string? Description { get; set; }
public decimal AmountPlus { get; set; }
public decimal AmountMinus { get; set; }
public DateTime? DeletedOn { get; set; }
}