I'm working on the promotion part of an ecommerce website.
We have two kinds of promotions:
- Offer discount to customers
- Offer gift products (free) to customers
Both promotions require some preconditions to be met by customers. For example, if the subtotal of the shopping cart is over $1000, the customer can get 20% discount. Another example, if the subtotal of the shopping cart is over $1500, the customer can get an iPad 3 as gift.
You can see that, the preconditions of these two promotion are similar. So I use a Promotion
class to represent a promotion, and a PromotionRule
class to present a precondition that customers should meet. The the models are (written in C#):
public class Promotion {
public string Name { get; set; }
public PromotionType Type { get; set; }
public decimal DiscountAmount { get; set; }
public IList<Product> GiftProducts { get; set; }
public IList<PromotionRule> Rules { get; set; }
}
public enum PromotionType {
Discount = 0,
GiftProduct = 1
}
public class PromotionRule {
public decimal? MinAmountOfTheShoppingCart { get; set; }
...
}
You can see that, a promotion can have a list of promotion rules which should be met by customers. The PromotionType
is used to indicate whether we will offer customers discounts or gift products.
Now, my question is: Is PromotionRule
a good name in this case? Because I'm not very good at English. I don't know if this name is easy to understand. Thanks!