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,51 @@
---
title: "Counter"
type: OpenSpec
status: Draft
domain: Customer Management
---
# Counter
## Requirement Definition
Displays all counter buckets for a chosen customer, including Customer-level, Account-level, and Card-level counters, which are updated by Campaign Rules or manually.
## Process Flow
### Pre-Conditions
- Users must have access rights in the "Counter" module.
## Business Rules
### Data Schema
#### Counter Value Detail
| Field Name | Description | Logic Type | Constraints / Rules |
|---|---|---|---|
| Counter | Counter identifier. | String | Read-only. |
| Entity | Cust [CU], Account [PA], Card [CA]. | Enum | Read-only. |
| Entity ID | CIF Number, Account Number, or Card Number. | String | Read-only. |
| What to count | The data entity tracked. | String | Read-only. |
| Counter Value | Counter value. | Decimal | Read-only. |
| Bucket Start Date | Start date. | Date | Read-only. |
| Bucket End Date | End date. | Date | Read-only. |
| Counter State | A: Awarded, C: New. | Enum | Read-only. |
#### Counter Statistic (History)
Lists transactions that updated this counter bucket.
| Field Name | Description | Logic Type | Constraints / Rules |
|---|---|---|---|
| Reference No | OLS Transaction Reference Number. | String | Read-only. |
| Post Date | Post date of the transaction. | Date | Read-only. |
| Counter Value | Value updated on this transaction. | Decimal | Read-only. |
| Bucket Number | Bucket number of selected counter. | Integer | Read-only. |
| Update Date | System date when updated. | Date | Read-only. |
| Updated By | Batch/User who posted transaction. | String | Read-only. |
### Execution
- **View-only screen.**
- Values retrieved from `Campaign_Counter` table.
- Filterable by Entity level and bucket periods. Effective records listed by default.
## Exception Flow
- N/A