2026-02-13 11:04:50 -06:00
|
|
|
namespace FiscalOS.Core.Accounts;
|
|
|
|
|
|
|
|
|
|
public sealed class Account : Entity
|
|
|
|
|
{
|
|
|
|
|
public Guid UserId { get; init; }
|
2026-02-13 12:03:07 -06:00
|
|
|
public Guid InstitutionId { get; init; }
|
2026-02-13 11:04:50 -06:00
|
|
|
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()
|
|
|
|
|
{
|
2026-02-13 12:03:07 -06:00
|
|
|
InstitutionId = institutionId,
|
2026-02-13 11:04:50 -06:00
|
|
|
Name = name,
|
|
|
|
|
Metadata = accountMetadata,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|