1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-19 17:53:47 +00:00

model adjustments

This commit is contained in:
Kyle Spearrin
2017-07-12 15:16:36 -04:00
parent 665e66a9a6
commit 18a86d3f12
14 changed files with 153 additions and 25 deletions

View File

@@ -0,0 +1,40 @@
using Bit.App.Models.Api;
using Bit.App.Models.Data;
namespace Bit.App.Models
{
public class Attachment
{
public Attachment()
{ }
public Attachment(AttachmentData data)
{
Id = data.Id;
Url = data.Url;
FileName = data.FileName;
Size = data.Size;
SizeName = data.SizeName;
}
public Attachment(AttachmentResponse response)
{
Id = response.Id;
Url = response.Url;
FileName = response.FileName;
Size = response.Size;
SizeName = response.SizeName;
}
public string Id { get; set; }
public string Url { get; set; }
public string FileName { get; set; }
public string Size { get; set; }
public string SizeName { get; set; }
public AttachmentData ToAttachmentData(string loginId)
{
return new AttachmentData(this, loginId);
}
}
}