2018-02-28 21:23:46 -05:00
|
|
|
|
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;
|
2018-03-01 09:29:49 -05:00
|
|
|
|
Fields = cipher.Fields?.Select(f => new CipherFieldData(f));
|
2018-07-27 17:49:27 -04:00
|
|
|
|
PasswordHistory = cipher.PasswordHistory?.Select(ph => new CipherPasswordHistoryData(ph));
|
2018-02-28 21:23:46 -05:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
public string Notes { get; set; }
|
|
|
|
|
|
public IEnumerable<CipherFieldData> Fields { get; set; }
|
2018-07-27 17:49:27 -04:00
|
|
|
|
public IEnumerable<CipherPasswordHistoryData> PasswordHistory { get; set; }
|
2018-02-28 21:23:46 -05:00
|
|
|
|
}
|
|
|
|
|
|
}
|