feat: initialize project backend structure and document system specifications across all modules

This commit is contained in:
SonPhung
2026-07-24 09:05:41 +07:00
parent 506008c69f
commit 4534e4ecb8
74 changed files with 7989 additions and 44 deletions

View File

@@ -0,0 +1,35 @@
---
title: "Campaign Rule - Contributor Settings"
type: OpenSpec
status: Draft
domain: Reward Campaign Management
---
# Campaign Rule - Contributor Settings
## Requirement Definition
Configures funding contributors for a reward. If a reward is funded by entities other than the transacting merchant (or split between them), Contributors define the split percentage.
## Process Flow
### Pre-Conditions
- Rule must be created.
- Contributing merchants (Chains) must exist in OLS.
## Business Rules
### Data Schema
| Field Name | Description | Logic Type | Constraints / Rules |
|---|---|---|---|
| Contributor | The Chain funding the reward. | Enum (Lookup) | Required. Unique per rule. |
| Contributor Percentage | Percentage of cost to fund. | Decimal | Required. > 0. |
| Absorb Remainder | Absorbs rounding remainders. | Boolean | Required. Exactly one must be true. |
### Execution
- Total contribution must equal 100%.
- Transaction processing splits the awarded value across Contributors based on percentages.
- If no contributors are configured, the transacting Merchant (Chain) absorbs 100% of the cost.
## Exception Flow
- Validation failures block saving.