Files
server/src/Core/Models/Api/CipherFieldModel.cs

28 lines
703 B
C#
Raw Normal View History

2017-09-13 16:54:23 -04:00
using System.ComponentModel.DataAnnotations;
using Bit.Core.Enums;
using Bit.Core.Models.Data;
2018-08-02 08:57:32 -04:00
using Bit.Core.Utilities;
2017-09-13 16:54:23 -04:00
namespace Bit.Core.Models.Api
{
public class CipherFieldModel
2017-09-13 16:54:23 -04:00
{
2018-03-01 09:29:49 -05:00
public CipherFieldModel() { }
public CipherFieldModel(CipherFieldData data)
{
Type = data.Type;
Name = data.Name;
Value = data.Value;
2021-11-04 07:27:15 +10:00
LinkedId = data.LinkedId ?? null;
}
2017-09-13 16:54:23 -04:00
public FieldType Type { get; set; }
2018-08-02 08:57:32 -04:00
[EncryptedStringLength(1000)]
2017-09-13 16:54:23 -04:00
public string Name { get; set; }
[EncryptedStringLength(5000)]
2017-09-13 16:54:23 -04:00
public string Value { get; set; }
2021-11-04 07:27:15 +10:00
public int? LinkedId { get; set; }
2017-09-13 16:54:23 -04:00
}
}