mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-03-10 12:05:51 -04:00
Co-authored-by: Joseph Milazzo <joseph.v.milazzo@gmail.com> Co-authored-by: Joe Milazzo <josephmajora@gmail.com>
45 lines
1.5 KiB
C#
45 lines
1.5 KiB
C#
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using Kavita.Models.DTOs.Account;
|
|
using Kavita.Models.Entities;
|
|
using Kavita.Models.Entities.Enums;
|
|
using Kavita.Models.Entities.Enums.User;
|
|
using Kavita.Models.Entities.Interfaces;
|
|
using Kavita.Models.Entities.User;
|
|
using NotImplementedException = System.NotImplementedException;
|
|
|
|
namespace Kavita.Models.DTOs;
|
|
#nullable enable
|
|
|
|
public sealed record UserDto : IHasCoverImage
|
|
{
|
|
public int Id { get; init; }
|
|
public string Username { get; init; } = null!;
|
|
public string Email { get; init; } = null!;
|
|
public IList<string> Roles { get; set; } = [];
|
|
public string Token { get; set; } = null!;
|
|
public string? RefreshToken { get; set; }
|
|
public string? ApiKey { get; init; }
|
|
public UserPreferencesDto? Preferences { get; set; }
|
|
public AgeRestrictionDto? AgeRestriction { get; init; }
|
|
public string KavitaVersion { get; set; }
|
|
/// <inheritdoc cref="AppUser.IdentityProvider"/>
|
|
public IdentityProvider IdentityProvider { get; init; }
|
|
public DateTime Created { get; set; }
|
|
public DateTime CreatedUtc { get; set; }
|
|
/// <summary>
|
|
/// Only System-provided Auth Keys
|
|
/// </summary>
|
|
public ICollection<AuthKeyDto> AuthKeys { get; set; }
|
|
|
|
public string? CoverImage { get; set; }
|
|
public string? PrimaryColor { get; set; }
|
|
public string? SecondaryColor { get; set; }
|
|
public void ResetColorScape()
|
|
{
|
|
PrimaryColor = string.Empty;
|
|
SecondaryColor = string.Empty;
|
|
}
|
|
}
|