diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-21 22:08:53 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-21 22:08:53 +0800 |
| commit | 4c60174fc66927db5536bc2fe06574c753140055 (patch) | |
| tree | c18fb8650d097f584cd8e141903cff2ffae0d0fd /src/FundLab.Domain/Dividend.fs | |
| parent | 722ec6c19c0c64ea5348c6bc3aefc0061bd96307 (diff) | |
| download | fund-lab-4c60174fc66927db5536bc2fe06574c753140055.tar.gz | |
Add dividend history visibility (3d-9a)
Expose a deterministic source key on booked dividend records and surface a read-only dividend history panel with empty state, backed by API tests and browser QA assertions.
Diffstat (limited to 'src/FundLab.Domain/Dividend.fs')
| -rw-r--r-- | src/FundLab.Domain/Dividend.fs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/FundLab.Domain/Dividend.fs b/src/FundLab.Domain/Dividend.fs index 005a1c5..5a4259b 100644 --- a/src/FundLab.Domain/Dividend.fs +++ b/src/FundLab.Domain/Dividend.fs @@ -15,6 +15,11 @@ module DividendPolicy = | Cash -> "cash" | Reinvest -> "reinvest" + /// Deterministic provenance key of a booked scheme. Shared by the writer (idempotency + /// identity) and the read model (历史列表的“来源 schema key”), so both stay in lockstep. + let schemeKey (fundId: Guid) (instrumentCode: string) (navDate: DateOnly) (mode: DividendMode) : string = + sprintf "dividend-scheme:%O:%s:%s:%s" fundId instrumentCode (navDate.ToString("yyyy-MM-dd")) (modeText mode) + let parseMode (text: string) : DividendMode option = match text with | null -> None |
