feat(infra): update db context with modeling for institution and relationships
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
namespace FiscalOS.Infra.Accounts.Plaid;
|
||||
|
||||
public sealed class PlaidMetadata : InstitutionMetadata
|
||||
{
|
||||
public const string TypeValue = "Plaid";
|
||||
public string PlaidId { get; init; } = string.Empty;
|
||||
public string PlaidName { get; init; } = string.Empty;
|
||||
public string EncryptedAccessToken { get; init; } = string.Empty;
|
||||
|
||||
private PlaidMetadata() : base(TypeValue)
|
||||
{
|
||||
}
|
||||
|
||||
public static PlaidMetadata From(
|
||||
string plaidId,
|
||||
string plaidName,
|
||||
string encryptedAccessToken
|
||||
)
|
||||
{
|
||||
return new PlaidMetadata
|
||||
{
|
||||
PlaidId = plaidId,
|
||||
PlaidName = plaidName,
|
||||
EncryptedAccessToken = encryptedAccessToken
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user