2026-02-12 16:19:21 -06:00
|
|
|
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()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2026-02-12 20:46:32 -06:00
|
|
|
public static Institution From(string? name, InstitutionMetadata metadata)
|
2026-02-12 16:19:21 -06:00
|
|
|
{
|
2026-02-12 20:46:32 -06:00
|
|
|
ArgumentNullException.ThrowIfNull(name, nameof(name));
|
|
|
|
|
ArgumentNullException.ThrowIfNull(metadata, nameof(metadata));
|
2026-02-12 16:19:21 -06:00
|
|
|
|
|
|
|
|
return new Institution()
|
|
|
|
|
{
|
|
|
|
|
Name = name,
|
|
|
|
|
Metadata = metadata
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|