feat(core): add models for institution

This commit is contained in:
Stevan Freeborn
2026-02-13 04:37:47 -06:00
parent 5da1f1decf
commit 3f62a246ee
4 changed files with 51 additions and 2 deletions
+24
View File
@@ -0,0 +1,24 @@
namespace FiscalOS.Core.Accounts;
public sealed class Institution : Entity
{
public Guid UserId { get; init; }
public string Name { get; init; } = string.Empty;
public InstitutionMetadata Metadata { get; init; } = null!;
private Institution()
{
}
public static Institution From(string name, InstitutionMetadata metadata)
{
ArgumentNullException.ThrowIfNull(name);
ArgumentNullException.ThrowIfNull(metadata);
return new Institution()
{
Name = name,
Metadata = metadata
};
}
}
@@ -0,0 +1,15 @@
namespace FiscalOS.Core.Accounts;
public abstract class InstitutionMetadata : Entity
{
private readonly string _type;
public string Type => _type;
public Guid InstitutionId { get; init; }
protected InstitutionMetadata(string type)
{
_type = type;
}
}