mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-10-22 14:28:59 -04:00
Co-authored-by: DieselTech <30128380+DieselTech@users.noreply.github.com> Co-authored-by: majora2007 <josephmajora@gmail.com>
31 lines
1.2 KiB
C#
31 lines
1.2 KiB
C#
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using API.Entities.Enums;
|
|
|
|
namespace API.DTOs.Account;
|
|
#nullable enable
|
|
|
|
public sealed record UpdateUserDto
|
|
{
|
|
/// <inheritdoc cref="API.Entities.AppUser.Id"/>
|
|
public int UserId { get; set; }
|
|
/// <inheritdoc cref="API.Entities.AppUser.UserName"/>
|
|
public string Username { get; set; } = default!;
|
|
/// <summary>
|
|
/// List of Roles to assign to user. If admin not present, Pleb will be applied.
|
|
/// If admin present, all libraries will be granted access and will ignore those from DTO.
|
|
/// </summary>
|
|
public IList<string> Roles { get; init; } = default!;
|
|
/// <summary>
|
|
/// A list of libraries to grant access to
|
|
/// </summary>
|
|
public IList<int> Libraries { get; init; } = default!;
|
|
/// <summary>
|
|
/// An Age Rating which will limit the account to seeing everything equal to or below said rating.
|
|
/// </summary>
|
|
public AgeRestrictionDto AgeRestriction { get; init; } = default!;
|
|
/// <inheritdoc cref="API.Entities.AppUser.Email"/>
|
|
public string? Email { get; set; } = default!;
|
|
public IdentityProvider IdentityProvider { get; init; } = IdentityProvider.Kavita;
|
|
}
|