Guest User

Untitled

a guest
Jun 23rd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. public enum FeatureInputType
  2. {
  3. CheckBox = 1,
  4. Number = 2,
  5. DropDownList = 3
  6. }
  7.  
  8. public class Feature : Entity
  9. {
  10. public string Name { get; set; }
  11. public string DisplayName { get; set; }
  12. public string NormalizedDisplayName { get; set; }
  13. public string DefaultValue { get; set; }
  14. public int DisplayOrder { get; set; }
  15. public string Description { get; set; }
  16. public FeatureInputType InputType { get; set; } = FeatureInputType.CheckBox;
  17. /// <summary>
  18. /// gets and sets items of feature as string json when InputType is DropDownList
  19. /// </summary>
  20. public string Items { get; set; }
  21. }
  22.  
  23. public class Edition : Entity
  24. {
  25. public string Title { get; set; }
  26. public string NormalizedTitle { get; set; }
  27. public bool IsFree { get; set; }
  28. public decimal? MonthlyPrice { get; set; }
  29. public decimal? YearlyPrice { get; set; }
  30. public bool IsTrialActive { get; set; }
  31. public int? TrialDaysCount { get; set; }
  32. public string Description { get; set; }
  33. public int DisplayOrder { get; set; }
  34. public byte[] RowVersion { get; set; }
  35.  
  36. public ICollection<EditionFeatureSetting> Features { get; set; } = new HashSet<EditionFeatureSetting>();
  37. }
  38.  
  39. //for TPH inheritance style
  40. public abstract class FeatureSetting : Entity
  41. {
  42. public string Value { get; set; }
  43.  
  44. public Feature Feature { get; set; }
  45. public long FeatureId { get; set; }
  46. }
  47.  
  48. public class EditionFeatureSetting : FeatureSetting
  49. {
  50. public long? EditionId { get; set; }
  51. public Edition Edition { get; set; }
  52. }
  53.  
  54. public class CustomerFeatureSetting : FeatureSetting
  55. {
  56. public long? CustomerId { get; set; }
  57. public Customer Customer { get; set; }
  58. }
  59.  
  60. public class Customer : Entity
  61. {
  62. public string Name { get; set; }
  63. public string NormalizedName { get; set; }
  64. public byte[] LogoFile { get; set; }
  65. public bool IsInTrialPeriod { get; set; }
  66. public DateTimeOffset SubscriptionStartDate { get; set; }
  67. public DateTimeOffset? SubscriptionEndDate { get; set; }
  68. public string PublicKey { get; set; }
  69. public string PrivateKey { get; set; }
  70. public byte[] RowVersion { get; set; }
  71.  
  72. public long EditionId { get; set; }
  73. public Edition Edition { get; set; }
  74. public ICollection<ModelingTemplate> Templates { get; set; } = new HashSet<ModelingTemplate>();
  75. public ICollection<CustomerFeatureSetting> Features { get; set; } = new HashSet<CustomerFeatureSetting>();
  76. }
Add Comment
Please, Sign In to add comment