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:
20
src/Core/Models/View/FieldView.cs
Normal file
20
src/Core/Models/View/FieldView.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
18
src/Core/Models/View/PasswordHistoryView.cs
Normal file
18
src/Core/Models/View/PasswordHistoryView.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user