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; }
|
2021-04-21 22:27:14 +02:00
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|