mirror of
https://github.com/bitwarden/mobile
synced 2025-12-10 05:13:31 +00:00
setup more models
This commit is contained in:
10
src/Core/Models/Data/Data.cs
Normal file
10
src/Core/Models/Data/Data.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Bit.Core.Models.Data
|
||||
{
|
||||
public abstract class Data
|
||||
{
|
||||
}
|
||||
}
|
||||
27
src/Core/Models/Data/LoginData.cs
Normal file
27
src/Core/Models/Data/LoginData.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Bit.Core.Models.Api;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Bit.Core.Models.Data
|
||||
{
|
||||
public class LoginData : Data
|
||||
{
|
||||
public LoginData() { }
|
||||
|
||||
public LoginData(LoginApi data)
|
||||
{
|
||||
Username = data.Username;
|
||||
Password = data.Password;
|
||||
PasswordRevisionDate = data.PasswordRevisionDate;
|
||||
Totp = data.Totp;
|
||||
Uris = data.Uris?.Select(u => new LoginUriData(u)).ToList();
|
||||
}
|
||||
|
||||
public List<LoginUriData> Uris { get; set; }
|
||||
public string Username { get; set; }
|
||||
public string Password { get; set; }
|
||||
public DateTime? PasswordRevisionDate { get; set; }
|
||||
public string Totp { get; set; }
|
||||
}
|
||||
}
|
||||
19
src/Core/Models/Data/LoginUriData.cs
Normal file
19
src/Core/Models/Data/LoginUriData.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Bit.Core.Enums;
|
||||
using Bit.Core.Models.Api;
|
||||
|
||||
namespace Bit.Core.Models.Data
|
||||
{
|
||||
public class LoginUriData : Data
|
||||
{
|
||||
public LoginUriData() { }
|
||||
|
||||
public LoginUriData(LoginUriApi data)
|
||||
{
|
||||
Uri = data.Uri;
|
||||
Match = data.Match;
|
||||
}
|
||||
|
||||
public string Uri { get; set; }
|
||||
public UriMatchType? Match { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ using Bit.Core.Models.Response;
|
||||
|
||||
namespace Bit.Core.Models.Data
|
||||
{
|
||||
public class OrganizationData
|
||||
public class OrganizationData : Data
|
||||
{
|
||||
public OrganizationData(ProfileOrganizationResponse response)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user