mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 08:02:49 -05:00
map json columns for org and user
This commit is contained in:
@ -1,11 +1,24 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json;
|
||||
using AutoMapper;
|
||||
|
||||
namespace Bit.Core.Models.EntityFramework
|
||||
{
|
||||
public class Organization : Table.Organization
|
||||
{
|
||||
private JsonDocument _twoFactorProvidersJson;
|
||||
|
||||
public ICollection<Cipher> Ciphers { get; set; }
|
||||
|
||||
public JsonDocument TwoFactorProvidersJson
|
||||
{
|
||||
get => _twoFactorProvidersJson;
|
||||
set
|
||||
{
|
||||
TwoFactorProviders = value.ToString();
|
||||
_twoFactorProvidersJson = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class OrganizationMapperProfile : Profile
|
||||
|
@ -1,11 +1,24 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json;
|
||||
using AutoMapper;
|
||||
|
||||
namespace Bit.Core.Models.EntityFramework
|
||||
{
|
||||
public class User : Table.User
|
||||
{
|
||||
private JsonDocument _twoFactorProvidersJson;
|
||||
|
||||
public ICollection<Cipher> Ciphers { get; set; }
|
||||
|
||||
public JsonDocument TwoFactorProvidersJson
|
||||
{
|
||||
get => _twoFactorProvidersJson;
|
||||
set
|
||||
{
|
||||
TwoFactorProviders = value.ToString();
|
||||
_twoFactorProvidersJson = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class UserMapperProfile : Profile
|
||||
|
Reference in New Issue
Block a user