mirror of
https://github.com/bitwarden/server.git
synced 2025-06-21 03:08:47 -05:00

* Move Api files * Move Core files * Move Infrastructure files * Move Sql Files * Move Api Sync files to Vault * Move test vault files * Update Sql.sqlproj paths * Update Codeowners * Fix vault file paths in sqlproj * Update CipherDetails.sql path in sqlproj * Update Core models and entities namespaces * Update namespaces Core Services and Repositories * Missed service namespaces * Update Api namespaces * Update Infrastructure namespaces * Move infrastructure queries that were missed * Tests namespace updates * Admin and Events namespace updates * Remove unused usings * Remove extra CiphersController usings * Rename folder * Fix CipherDetails namespace * Sqlproj fixes * Move stored procs into folders by table * using order fix
37 lines
835 B
C#
37 lines
835 B
C#
using Bit.Core.Utilities;
|
|
using Bit.Core.Vault.Enums;
|
|
using Bit.Core.Vault.Models.Data;
|
|
|
|
namespace Bit.Api.Vault.Models;
|
|
|
|
public class CipherFieldModel
|
|
{
|
|
public CipherFieldModel() { }
|
|
|
|
public CipherFieldModel(CipherFieldData data)
|
|
{
|
|
Type = data.Type;
|
|
Name = data.Name;
|
|
Value = data.Value;
|
|
LinkedId = data.LinkedId ?? null;
|
|
}
|
|
|
|
public FieldType Type { get; set; }
|
|
[EncryptedStringLength(1000)]
|
|
public string Name { get; set; }
|
|
[EncryptedStringLength(5000)]
|
|
public string Value { get; set; }
|
|
public int? LinkedId { get; set; }
|
|
|
|
public CipherFieldData ToCipherFieldData()
|
|
{
|
|
return new CipherFieldData
|
|
{
|
|
Type = Type,
|
|
Name = Name,
|
|
Value = Value,
|
|
LinkedId = LinkedId ?? null,
|
|
};
|
|
}
|
|
}
|