//-----------------------------------------------------------------------
//
// Copyright (c) aliasvault. All rights reserved.
// Licensed under the AGPLv3 license. See LICENSE.md file in the project root for full license information.
//
//-----------------------------------------------------------------------
namespace AliasServerDb;
///
/// Mobile unlock request entity for storing temporary unlock requests.
///
public class MobileUnlockRequest
{
///
/// Gets or sets the unique identifier for this unlock request.
///
public string Id { get; set; } = string.Empty;
///
/// Gets or sets the public key from the client (base64 encoded).
///
public string ClientPublicKey { get; set; } = string.Empty;
///
/// Gets or sets the encrypted decryption key from the mobile app (base64 encoded).
/// Will be null until mobile app responds.
///
public string? EncryptedDecryptionKey { get; set; }
///
/// Gets or sets the username provided by the mobile app.
/// Will be null until mobile app responds.
///
public string? Username { get; set; }
///
/// Gets or sets the salt for the user.
/// Will be populated when mobile app provides the username.
///
public string? Salt { get; set; }
///
/// Gets or sets the encryption type for the user.
/// Will be populated when mobile app provides the username.
///
public string? EncryptionType { get; set; }
///
/// Gets or sets the encryption settings for the user.
/// Will be populated when mobile app provides the username.
///
public string? EncryptionSettings { get; set; }
///
/// Gets or sets a value indicating whether this request has been fulfilled.
///
public bool Fulfilled { get; set; }
///
/// Gets or sets the created timestamp.
///
public DateTime CreatedAt { get; set; }
///
/// Gets or sets the fulfilled timestamp (when mobile app submitted the response).
///
public DateTime? FulfilledAt { get; set; }
///
/// Gets or sets the retrieved timestamp (when client successfully retrieved and decrypted).
///
public DateTime? RetrievedAt { get; set; }
///
/// Gets or sets the IP address of the client that initiated the request.
///
public string? ClientIpAddress { get; set; }
///
/// Gets or sets the IP address of the mobile device that fulfilled the request.
///
public string? MobileIpAddress { get; set; }
}