mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-06-05 14:25:17 -04:00
Progress Overhaul + Profile Page and a LOT more! (#4262)
Co-authored-by: Amelia <77553571+Fesaa@users.noreply.github.com> Co-authored-by: Robbie Davis <robbie@therobbiedavis.com>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using API.Entities.Enums.User;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace API.Entities.User;
|
||||
|
||||
[Index(nameof(Key), IsUnique = true)]
|
||||
[Index(nameof(ExpiresAtUtc), IsUnique = false)]
|
||||
public class AppUserAuthKey
|
||||
{
|
||||
public int Id { get; set; }
|
||||
/// <summary>
|
||||
/// Actual key
|
||||
/// </summary>
|
||||
/// <remarks>This is a variable string length from [6-32] alphanumeric characters</remarks>
|
||||
public required string Key { get; set; }
|
||||
/// <summary>
|
||||
/// Name of the key
|
||||
/// </summary>
|
||||
public required string Name { get; set; }
|
||||
|
||||
public DateTime CreatedAtUtc { get; set; }
|
||||
/// <summary>
|
||||
/// An Optional time which the Key expires
|
||||
/// </summary>
|
||||
public DateTime? ExpiresAtUtc { get; set; }
|
||||
public DateTime? LastAccessedAt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Kavita will have a short-lived key
|
||||
/// </summary>
|
||||
public AuthKeyProvider Provider { get; set; } = AuthKeyProvider.User;
|
||||
|
||||
public int AppUserId { get; set; }
|
||||
public virtual AppUser AppUser { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user