1
0
mirror of https://github.com/bitwarden/server synced 2025-12-17 00:33:23 +00:00
Files
server/src/Core/Models/Data/CipherData.cs
2018-07-27 17:49:27 -04:00

25 lines
749 B
C#

using System.Collections.Generic;
using System.Linq;
using Bit.Core.Models.Api;
namespace Bit.Core.Models.Data
{
public abstract class CipherData
{
public CipherData() { }
public CipherData(CipherRequestModel cipher)
{
Name = cipher.Name;
Notes = cipher.Notes;
Fields = cipher.Fields?.Select(f => new CipherFieldData(f));
PasswordHistory = cipher.PasswordHistory?.Select(ph => new CipherPasswordHistoryData(ph));
}
public string Name { get; set; }
public string Notes { get; set; }
public IEnumerable<CipherFieldData> Fields { get; set; }
public IEnumerable<CipherPasswordHistoryData> PasswordHistory { get; set; }
}
}