Files
server/src/Core/Models/EntityFramework/Organization.cs

33 lines
795 B
C#
Raw Normal View History

2020-01-08 21:34:49 -05:00
using System.Collections.Generic;
2020-01-08 21:38:32 -05:00
using System.Text.Json;
2020-01-08 21:34:49 -05:00
using AutoMapper;
namespace Bit.Core.Models.EntityFramework
{
public class Organization : Table.Organization
{
2020-01-08 21:38:32 -05:00
private JsonDocument _twoFactorProvidersJson;
2020-01-08 21:34:49 -05:00
public ICollection<Cipher> Ciphers { get; set; }
[IgnoreMap]
2020-01-08 21:38:32 -05:00
public JsonDocument TwoFactorProvidersJson
{
get => _twoFactorProvidersJson;
set
{
2020-01-10 18:54:44 -05:00
TwoFactorProviders = value?.ToString();
2020-01-08 21:38:32 -05:00
_twoFactorProvidersJson = value;
}
}
2020-01-08 21:34:49 -05:00
}
public class OrganizationMapperProfile : Profile
{
public OrganizationMapperProfile()
{
CreateMap<Table.Organization, Organization>().ReverseMap();
}
}
}