24 lines
529 B
C#
24 lines
529 B
C#
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
|
||
|
|
};
|
||
|
|
}
|
||
|
|
}
|