mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-06-23 07:20:32 -04:00
* Tweaked the logging output * Started implementing some basic idea for devices * Updated Email Service with new API routes * Implemented basic DB structure and some APIs to prep for the UI and flows. * Added an abstract class to make Unit testing easier. * Removed dependency we don't need * Updated the UI to be able to show devices and add new devices. Email field will update the platform if the user hasn't interacted with it already. * Added ability to delete a device as well * Basic ability to send files to devices works * Refactored Action code to pass ActionItem back and allow for dynamic children based on an Observable (api). Hooked in ability to send a chapter to a device. There is no logic in the FE to validate type. * Fixed a broken unit test * Implemented the ability to edit a device * Code cleanup * Fixed a bad success message * Fixed broken unit test from updating mock layer
56 lines
1.7 KiB
C#
56 lines
1.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using API.Entities.Interfaces;
|
|
using Microsoft.AspNetCore.Identity;
|
|
|
|
|
|
namespace API.Entities;
|
|
|
|
public class AppUser : IdentityUser<int>, IHasConcurrencyToken
|
|
{
|
|
public DateTime Created { get; set; } = DateTime.Now;
|
|
public DateTime LastActive { get; set; }
|
|
public ICollection<Library> Libraries { get; set; }
|
|
public ICollection<AppUserRole> UserRoles { get; set; }
|
|
public ICollection<AppUserProgress> Progresses { get; set; }
|
|
public ICollection<AppUserRating> Ratings { get; set; }
|
|
public AppUserPreferences UserPreferences { get; set; }
|
|
/// <summary>
|
|
/// Bookmarks associated with this User
|
|
/// </summary>
|
|
public ICollection<AppUserBookmark> Bookmarks { get; set; }
|
|
/// <summary>
|
|
/// Reading lists associated with this user
|
|
/// </summary>
|
|
public ICollection<ReadingList> ReadingLists { get; set; }
|
|
/// <summary>
|
|
/// A list of Series the user want's to read
|
|
/// </summary>
|
|
public ICollection<Series> WantToRead { get; set; }
|
|
/// <summary>
|
|
/// A list of Devices which allows the user to send files to
|
|
/// </summary>
|
|
public ICollection<Device> Devices { get; set; }
|
|
/// <summary>
|
|
/// An API Key to interact with external services, like OPDS
|
|
/// </summary>
|
|
public string ApiKey { get; set; }
|
|
/// <summary>
|
|
/// The confirmation token for the user (invite). This will be set to null after the user confirms.
|
|
/// </summary>
|
|
public string ConfirmationToken { get; set; }
|
|
|
|
|
|
/// <inheritdoc />
|
|
[ConcurrencyCheck]
|
|
public uint RowVersion { get; private set; }
|
|
|
|
/// <inheritdoc />
|
|
public void OnSavingChanges()
|
|
{
|
|
RowVersion++;
|
|
}
|
|
|
|
}
|