1
0
mirror of https://github.com/bitwarden/server synced 2025-12-14 07:13:39 +00:00
This commit is contained in:
Kyle Spearrin
2020-01-08 21:34:49 -05:00
parent 46c258428e
commit 9fa7f335bd
7 changed files with 115 additions and 4 deletions

View File

@@ -1,17 +1,40 @@
using AutoMapper;
using System.Text.Json;
using AutoMapper;
namespace Bit.Core.Models.EntityFramework
{
public class Cipher : Table.Cipher
{
private JsonDocument _dataJson;
private JsonDocument _attachmentsJson;
public User User { get; set; }
public Organization Organization { get; set; }
public JsonDocument DataJson
{
get => _dataJson;
set
{
Data = value.ToString();
_dataJson = value;
}
}
public JsonDocument AttachmentsJson
{
get => _attachmentsJson;
set
{
Attachments = value.ToString();
_attachmentsJson = value;
}
}
}
public class CipherMapperProfile : Profile
{
public CipherMapperProfile()
{
CreateMap<Table.Cipher, Cipher>();
CreateMap<Table.Cipher, Cipher>().ReverseMap();
}
}
}