1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-17 08:43:21 +00:00

field and password history domains/views

This commit is contained in:
Kyle Spearrin
2019-04-12 17:21:21 -04:00
parent 52a978a59a
commit d136eee224
4 changed files with 127 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
using Bit.Core.Enums;
using Bit.Core.Models.Domain;
namespace Bit.Core.Models.View
{
public class FieldView : View
{
public FieldView() { }
public FieldView(Field f)
{
Type = f.Type;
}
public string Name { get; set; }
public string Value { get; set; }
public FieldType Type { get; set; }
public string MaskedValue => Value != null ? "••••••••" : null;
}
}

View File

@@ -0,0 +1,18 @@
using Bit.Core.Models.Domain;
using System;
namespace Bit.Core.Models.View
{
public class PasswordHistoryView : View
{
public PasswordHistoryView() { }
public PasswordHistoryView(PasswordHistory ph)
{
LastUsedDate = ph.LastUsedDate;
}
public string Password { get; set; }
public DateTime? LastUsedDate { get; set; }
}
}