The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

User.cs 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. namespace Teknik.Areas.Users.Models
  9. {
  10. public class User
  11. {
  12. public int UserId { get; set; }
  13. public string Username { get; set; }
  14. [CaseSensitive]
  15. public string HashedPassword { get; set; }
  16. public virtual ICollection<TransferType> Transfers { get; set; }
  17. public DateTime JoinDate { get; set; }
  18. public DateTime LastSeen { get; set; }
  19. public virtual ICollection<Group> Groups { get; set; }
  20. public virtual UserSettings UserSettings { get; set; }
  21. public virtual SecuritySettings SecuritySettings { get; set; }
  22. public virtual BlogSettings BlogSettings { get; set; }
  23. public virtual UploadSettings UploadSettings { get; set; }
  24. public virtual ICollection<TrustedDevice> TrustedDevices { get; set; }
  25. public virtual ICollection<AuthToken> AuthTokens { get; set; }
  26. public virtual ICollection<Upload.Models.Upload> Uploads { get; set; }
  27. public virtual ICollection<Paste.Models.Paste> Pastes { get; set; }
  28. public virtual ICollection<Shortener.Models.ShortenedUrl> ShortenedUrls { get; set; }
  29. public virtual ICollection<Vault.Models.Vault> Vaults { get; set; }
  30. public User()
  31. {
  32. Username = string.Empty;
  33. HashedPassword = string.Empty;
  34. Transfers = new List<TransferType>();
  35. JoinDate = DateTime.Now;
  36. LastSeen = DateTime.Now;
  37. Groups = new List<Group>();
  38. TrustedDevices = new List<TrustedDevice>();
  39. AuthTokens = new List<AuthToken>();
  40. }
  41. }
  42. }