feat(core): add models for account

This commit is contained in:
Stevan Freeborn
2026-02-13 12:38:18 -06:00
parent 1a41c3c0b6
commit 2fdb849142
3 changed files with 45 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
namespace FiscalOS.Core.Accounts;
public sealed class Account : Entity
{
public Guid UserId { get; init; }
public Guid InstituionId { get; init; }
public Institution Institution { get; init; } = null!;
public string Name { get; init; } = string.Empty;
public AccountMetadata Metadata { get; init; } = null!;
public static Account From(Guid institutionId, string name, AccountMetadata accountMetadata)
{
return new()
{
InstituionId = institutionId,
Name = name,
Metadata = accountMetadata,
};
}
}
@@ -0,0 +1,15 @@
namespace FiscalOS.Core.Accounts;
public abstract class AccountMetadata : Entity
{
private readonly string _type;
public string Type => _type;
public Guid AccountId { get; init; }
protected AccountMetadata(string type)
{
_type = type;
}
}