User.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace WpfApp29.Models
  8. {
  9. public class User
  10. {
  11. public User()
  12. {
  13. }
  14. public User(string name, string familiya, string otchestvo, string login, string password, string phone)
  15. {
  16. Id = 0;
  17. Name = name;
  18. Familiya = familiya;
  19. Otchestvo = otchestvo;
  20. Login = login;
  21. Password = password;
  22. Phone = phone;
  23. }
  24. // FOREIGN KEY
  25. [Key]
  26. public int Id { get; set; }
  27. // MAIN FIELDS
  28. public string Name { get; set; }
  29. public string Familiya { get; set; }
  30. public string Otchestvo { get; set; }
  31. public string Login { get; set; }
  32. public string Password { get; set; }
  33. public string Phone { get; set; }
  34. // PERVIOUS OBJECTS
  35. public virtual List<Task> TaskCreators { get; set; } = new List<Task> { };
  36. public virtual List<Task> TaskDoers { get; set; } = new List<Task> { };
  37. public static User CurrentUser { get; set; } = null!;
  38. }
  39. }