The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

User.cs 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. using System;
  2. using System.ComponentModel.DataAnnotations;
  3. using Microsoft.AspNet.Identity.EntityFramework;
  4. using System.Collections.Generic;
  5. using System.ComponentModel.DataAnnotations.Schema;
  6. using Teknik.Attributes;
  7. using Teknik.Models;
  8. using Teknik.Utilities;
  9. namespace Teknik.Areas.Users.Models
  10. {
  11. public class User
  12. {
  13. public int UserId { get; set; }
  14. public string Username { get; set; }
  15. [CaseSensitive]
  16. public string HashedPassword { get; set; }
  17. public virtual ICollection<TransferType> Transfers { get; set; }
  18. public DateTime JoinDate { get; set; }
  19. public DateTime LastSeen { get; set; }
  20. public AccountType AccountType { get; set; }
  21. public AccountStatus AccountStatus { get; set; }
  22. public virtual ICollection<Group> Groups { get; set; }
  23. public virtual UserSettings UserSettings { get; set; }
  24. public virtual SecuritySettings SecuritySettings { get; set; }
  25. public virtual BlogSettings BlogSettings { get; set; }
  26. public virtual UploadSettings UploadSettings { get; set; }
  27. public virtual ICollection<TrustedDevice> TrustedDevices { get; set; }
  28. public virtual ICollection<AuthToken> AuthTokens { get; set; }
  29. public virtual ICollection<Upload.Models.Upload> Uploads { get; set; }
  30. public virtual ICollection<Paste.Models.Paste> Pastes { get; set; }
  31. public virtual ICollection<Shortener.Models.ShortenedUrl> ShortenedUrls { get; set; }
  32. public virtual ICollection<Vault.Models.Vault> Vaults { get; set; }
  33. public User()
  34. {
  35. Username = string.Empty;
  36. HashedPassword = string.Empty;
  37. Transfers = new List<TransferType>();
  38. JoinDate = DateTime.Now;
  39. LastSeen = DateTime.Now;
  40. AccountType = AccountType.Basic;
  41. AccountStatus = AccountStatus.Active;
  42. Groups = new List<Group>();
  43. TrustedDevices = new List<TrustedDevice>();
  44. AuthTokens = new List<AuthToken>();
  45. }
  46. }
  47. }