rule_engine/

directory
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 26, 2024 License: Unlicense

README

Introduction to DCDQL(Discount Condition Definition Query Language)

Condition := Expression (LogicalOperator Expression)*
Expression := Key ComparisonOperator Value
Key := "min_cart_value" | "total_price" | "product_id" | "total_category_price" | "category_id"
ComparisonOperator := "==" | "!=" | ">" | "<" | ">=" | "<=" | "in"
Value := Float | String | []String | []Float
LogicalOperator := "AND" | "OR"
Action := "THEN" DiscountType AssignmentOperator Value
DiscountType := "Percentage" | "FlatAmount" | "BOGO"
AssignmentOperator := "="

Syntax Examples

1. min_cart_value > 100 AND product_category == "dairy" THEN Percentage=10
2. product_id IN [1,2,3] OR total_category_price >= 50 THEN FlatAmount=5

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL