1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-17 08:43:21 +00:00
This commit is contained in:
Kyle Spearrin
2016-05-03 02:08:50 -04:00
parent c6222c8ed3
commit 92e74274e0
24 changed files with 574 additions and 214 deletions

View File

@@ -1,11 +1,12 @@
using System;
using SQLite;
using Bit.App.Abstractions;
using Bit.App.Models.Api;
namespace Bit.App.Models.Data
{
[Table("Folder")]
public class FolderData : IDataObject<int>
public class FolderData : IDataObject<string>
{
public FolderData()
{ }
@@ -13,15 +14,19 @@ namespace Bit.App.Models.Data
public FolderData(Folder folder, string userId)
{
Id = folder.Id;
ServerId = folder.ServerId;
UserId = userId;
Name = folder.Name?.EncryptedString;
}
public FolderData(FolderResponse folder, string userId)
{
Id = folder.Id;
UserId = userId;
Name = folder.Name;
}
[PrimaryKey]
[AutoIncrement]
public int Id { get; set; }
public string ServerId { get; set; }
public string Id { get; set; }
public string UserId { get; set; }
public string Name { get; set; }
public DateTime RevisionDateTime { get; set; } = DateTime.UtcNow;