Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public enum FeatureInputType
- {
- CheckBox = 1,
- Number = 2,
- DropDownList = 3
- }
- public class Feature : Entity
- {
- public string Name { get; set; }
- public string DisplayName { get; set; }
- public string NormalizedDisplayName { get; set; }
- public string DefaultValue { get; set; }
- public int DisplayOrder { get; set; }
- public string Description { get; set; }
- public FeatureInputType InputType { get; set; } = FeatureInputType.CheckBox;
- /// <summary>
- /// gets and sets items of feature as string json when InputType is DropDownList
- /// </summary>
- public string Items { get; set; }
- }
- public class Edition : Entity
- {
- public string Title { get; set; }
- public string NormalizedTitle { get; set; }
- public bool IsFree { get; set; }
- public decimal? MonthlyPrice { get; set; }
- public decimal? YearlyPrice { get; set; }
- public bool IsTrialActive { get; set; }
- public int? TrialDaysCount { get; set; }
- public string Description { get; set; }
- public int DisplayOrder { get; set; }
- public byte[] RowVersion { get; set; }
- public ICollection<EditionFeatureSetting> Features { get; set; } = new HashSet<EditionFeatureSetting>();
- }
- //for TPH inheritance style
- public abstract class FeatureSetting : Entity
- {
- public string Value { get; set; }
- public Feature Feature { get; set; }
- public long FeatureId { get; set; }
- }
- public class EditionFeatureSetting : FeatureSetting
- {
- public long? EditionId { get; set; }
- public Edition Edition { get; set; }
- }
- public class CustomerFeatureSetting : FeatureSetting
- {
- public long? CustomerId { get; set; }
- public Customer Customer { get; set; }
- }
- public class Customer : Entity
- {
- public string Name { get; set; }
- public string NormalizedName { get; set; }
- public byte[] LogoFile { get; set; }
- public bool IsInTrialPeriod { get; set; }
- public DateTimeOffset SubscriptionStartDate { get; set; }
- public DateTimeOffset? SubscriptionEndDate { get; set; }
- public string PublicKey { get; set; }
- public string PrivateKey { get; set; }
- public byte[] RowVersion { get; set; }
- public long EditionId { get; set; }
- public Edition Edition { get; set; }
- public ICollection<ModelingTemplate> Templates { get; set; } = new HashSet<ModelingTemplate>();
- public ICollection<CustomerFeatureSetting> Features { get; set; } = new HashSet<CustomerFeatureSetting>();
- }
Add Comment
Please, Sign In to add comment