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, IHasConcurrencyToken { public DateTime Created { get; set; } = DateTime.Now; public DateTime LastActive { get; set; } public ICollection Libraries { get; set; } public ICollection UserRoles { get; set; } public ICollection Progresses { get; set; } public ICollection Ratings { get; set; } public AppUserPreferences UserPreferences { get; set; } public ICollection Bookmarks { get; set; } /// /// Reading lists associated with this user /// public ICollection ReadingLists { get; set; } /// /// An API Key to interact with external services, like OPDS /// public string ApiKey { get; set; } /// [ConcurrencyCheck] public uint RowVersion { get; private set; } /// public void OnSavingChanges() { RowVersion++; } } }