1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-28 14:13:25 +00:00

initial commit

This commit is contained in:
Kyle Spearrin
2016-05-02 02:52:09 -04:00
commit bc3d9c4465
95 changed files with 9245 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
using System;
using SQLite;
using Bit.App.Abstractions;
namespace Bit.App.Models.Data
{
[Table("Folder")]
public class FolderData : IDataObject<int>
{
public FolderData()
{ }
public FolderData(Folder folder)
{
Id = folder.Id;
ServerId = folder.ServerId;
Name = folder.Name?.EncryptedString;
}
[PrimaryKey]
[AutoIncrement]
public int Id { get; set; }
public string ServerId { get; set; }
public string Name { get; set; }
public DateTime RevisionDateTime { get; set; } = DateTime.UtcNow;
public Folder ToFolder()
{
return new Folder(this);
}
}
}

View File

@@ -0,0 +1,44 @@
using System;
using SQLite;
using Bit.App.Abstractions;
namespace Bit.App.Models.Data
{
[Table("Site")]
public class SiteData : IDataObject<int>
{
public SiteData()
{ }
public SiteData(Site site)
{
Id = site.Id;
ServerId = site.ServerId;
FolderId = site.FolderId;
ServerFolderId = site.ServerFolderId;
Name = site.Name?.EncryptedString;
Uri = site.Uri?.EncryptedString;
Username = site.Username?.EncryptedString;
Password = site.Password?.EncryptedString;
Notes = site.Notes?.EncryptedString;
}
[PrimaryKey]
[AutoIncrement]
public int Id { get; set; }
public string ServerId { get; set; }
public int? FolderId { get; set; }
public string ServerFolderId { get; set; }
public string Name { get; set; }
public string Uri { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public string Notes { get; set; }
public DateTime RevisionDateTime { get; set; } = DateTime.UtcNow;
public Site ToSite()
{
return new Site(this);
}
}
}