1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-04 08:50:18 +01:00
bitwarden-mobile/src/Core/Models/Domain/Folder.cs

33 lines
871 B
C#
Raw Normal View History

2019-04-15 14:42:50 +02:00
using Bit.Core.Models.Data;
using Bit.Core.Models.View;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Bit.Core.Models.Domain
{
public class Folder : Domain
{
public Folder() { }
public Folder(FolderData obj, bool alreadyEncrypted = false)
{
BuildDomainModel(this, obj, new HashSet<string>
{
"Id",
"Name"
}, alreadyEncrypted, new HashSet<string> { "Id" });
RevisionDate = obj.RevisionDate;
}
public string Id { get; set; }
public EncString Name { get; set; }
2019-04-15 14:42:50 +02:00
public DateTime RevisionDate { get; set; }
2019-04-17 05:31:05 +02:00
public Task<FolderView> DecryptAsync()
2019-04-15 14:42:50 +02:00
{
2019-04-17 05:31:05 +02:00
return DecryptObjAsync(new FolderView(this), this, new HashSet<string> { "Name" }, null);
2019-04-15 14:42:50 +02:00
}
}
}