using Radium.DataExporter.Models.Common.Enums;
using System.Text.Json.Serialization;

namespace Radium.DataExporter.Models.Authentication;

public class CachedLogin
{
    [JsonPropertyName(name: "platform")] public PlatformType Platform { get; set; }
    [JsonPropertyName(name: "platformId")] public string PlatformId { get; set; } = string.Empty;
    [JsonPropertyName(name: "accountId")] public long AccountId { get; set; }
    [JsonPropertyName(name: "lastLoginTime")] public DateTime LastLoginTime { get; set; } = DateTime.UtcNow;

    [JsonPropertyName(name: "requirePassword")]
    [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
    public bool RequirePassword { get; set; } = false;
}