Add project files.

This commit is contained in:
2023-04-29 09:17:17 +03:00
commit 62178f1f32
493 changed files with 45863 additions and 0 deletions
+70
View File
@@ -0,0 +1,70 @@
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; }
}
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
+19
View File
@@ -0,0 +1,19 @@
namespace MyOffice.Data.Models.Users;
using Account;
public class User
{
public Guid Id { get; set; }
public string UserName { get; set; } = null!;
public string Email { get; set; } = null!;
public string PasswordHash { get; set; } = null!;
public string? FirstName { get; set; }
public string? LastName { get; set; }
public string? FullName { get; set; }
public string? Phone { get; set; }
public bool IsEmailConfirmed { get; set; }
public IEnumerable<UserExternal>? UserClaims { get; set; }
public IEnumerable<Currency>? Currencies { get; set; }
}
@@ -0,0 +1,12 @@
namespace MyOffice.Data.Models.Users;
public class UserExternal
{
public int Id { get; set; }
public DateTime CreatedOn { get; set; }
public Guid UserId { get; set; }
public User User { get; set; } = null!;
public string ExternalId { get; set; } = null!;
public string Email { get; set; } = null!;
public string Provider { get; set; } = null!;
}