Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. // ReSharper disable VirtualMemberCallInConstructor
  2. namespace Olympia.Data.Domain
  3. {
  4. using System;
  5. using System.Collections.Generic;
  6. using System.ComponentModel.DataAnnotations.Schema;
  7. using Microsoft.AspNetCore.Identity;
  8. using Olympia.Data.Common.Models;
  9. using Olympia.Data.Domain.Enums;
  10.  
  11. public class OlympiaUser : IdentityUser, IAuditInfo, IDeletableEntity
  12. {
  13. public OlympiaUser()
  14. {
  15. this.Id = Guid.NewGuid().ToString();
  16. this.Claims = new HashSet<IdentityUserClaim<string>>();
  17. this.Logins = new HashSet<IdentityUserLogin<string>>();
  18. this.Addresses = new HashSet<Address>();
  19. this.Clients = new HashSet<OlympiaUser>();
  20. this.OlympiaUserRole = new HashSet<IdentityUserRole<string>>();
  21.  
  22. this.FitnessPlan = new FitnessPlan();
  23.  
  24. }
  25.  
  26. public Gender Gender { get; set; }
  27.  
  28. public string FullName { get; set; }
  29.  
  30. // Audit info
  31. public DateTime CreatedOn { get; set; }
  32.  
  33. public DateTime? ModifiedOn { get; set; }
  34.  
  35. // Deletable entity
  36. public bool IsDeleted { get; set; }
  37.  
  38. public DateTime? DeletedOn { get; set; }
  39.  
  40. public string TrainerId { get; set; }
  41.  
  42. public virtual OlympiaUser Trainer { get; set; }
  43.  
  44. public int Age { get; set; }
  45.  
  46. public virtual FitnessPlan FitnessPlan { get; set; }
  47.  
  48. public double Rating { get; set; }
  49.  
  50. public string Description { get; set; }
  51.  
  52. public string ProfilePicturImgUrl { get; set; }
  53.  
  54. public double? Weight { get; set; }
  55.  
  56. public double? Height { get; set; }
  57.  
  58. public ActityLevel Activity { get; set; }
  59.  
  60. public string ShoppingCartId { get; set; }
  61.  
  62. public virtual ShoppingCart ShoppingCart { get; set; }
  63.  
  64. public virtual ICollection<OlympiaUser> Clients { get; set; }
  65.  
  66. public ICollection<IdentityUserRole<string>> OlympiaUserRole { get; set; }
  67.  
  68. public virtual ICollection<IdentityUserClaim<string>> Claims { get; set; }
  69.  
  70. public virtual ICollection<IdentityUserLogin<string>> Logins { get; set; }
  71.  
  72. public virtual ICollection<Address> Addresses { get; set; }
  73.  
  74. public virtual ICollection<Article> Articles { get; set; }
  75.  
  76.  
  77.  
  78. }
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement