SPEC-DDD-GOV-OCSF Rev 0.4.1 · 2026-08-03

Cane Agency · DDD Seriesสถาบันอ้อย · ชุดเอกสาร DDD

Department Design — OCSF fund office (กองทุน)การออกแบบหน่วยงาน — สำนักงานกองทุนอ้อยและน้ำตาลทราย (กองทุน)

Documentเอกสาร
SPEC-DDD-GOV-OCSF
Versionversion (เวอร์ชัน)
0.4.1 · Draftฉบับร่าง
Updatedปรับปรุงล่าสุด
2026-08-03
CapacityCapacity
ocsf
Surfaceช่องทางใช้งาน
ocsf
Prototypeต้นแบบ
apps/ocsf/
Masterเอกสารหลัก
SPEC-DDD
Government clusterกลุ่มหน่วยงานรัฐThis is the OCSF (กองทุน) fund-office perspective (capacity ocsf, surface ocsf). The regulator office สอน. is the sibling DDD-GOV-OCSB. OCSF administers the levies the กอน. Board authorizes; it never sets policy or touches the market.นี่คือมุมมองสำนักงานกองทุน OCSF (กองทุน) (capacity ocsf, surface ocsf) สำนักงานผู้กำกับ สอน. อยู่ที่ DDD-GOV-OCSB OCSF บริหารเงินเก็บที่ กอน. อนุมัติ ไม่กำหนดนโยบายและไม่ยุ่งกับตลาด

1. Scope & perspective1. ขอบเขตและมุมมอง

This is the OCSF — fund office (กองทุน) perspective of SPEC-DDD for the ocsf capacity. A new perspective family created by PROP-015 (v0.2.0) — OCSF was previously documented only in the masters (PROP-013). The single source of truth is the graph.

นี่คือมุมมอง สำนักงานกองทุนอ้อยและน้ำตาลทราย (กองทุน) ของ SPEC-DDD สำหรับ capacity ocsf ตระกูลมุมมองใหม่ที่สร้างโดย PROP-015 (v0.2.0) — เดิม OCSF อยู่ในเอกสารหลักเท่านั้น (PROP-013) แหล่งความจริงเดียวคือ graph

2. In this perspective2. สิ่งที่อยู่ในมุมมองนี้

3. Aggregate boundaries & transaction rules3. ขอบเขต aggregate และกติกา transaction

The normative consistency boundaries of this perspective's home context (fund), rendered from graph dataModeling.aggregates (v0.4.0, PROP-018). The prose invariants above stay explanatory; the rules here are the transactional contract an implementation must enforce. Column-level persistence for every member entity lives in the sibling SPEC-ERD family (see the Data column).

ขอบเขตความสอดคล้องเชิงบรรทัดฐานของ context ที่ home อยู่มุมมองนี้ (fund) render จาก dataModeling.aggregates ใน graph (v0.4.0, PROP-018) คำอธิบาย invariant ข้างบนคงไว้เพื่อความเข้าใจ; กติกาในส่วนนี้คือสัญญาเชิง transaction ที่ implementation ต้องบังคับใช้ ส่วน persistence ระดับ column ของ entity สมาชิกทุกตัวอยู่ในตระกูล SPEC-ERD พี่น้อง (ดู column ข้อมูล)

fundCaneSugarFundกองทุนอ้อยและน้ำตาลทรายFundContributionFundCompensationFundLevyRateอัตราเงินสมทบ/เงินเก็บเข้ากองทุน
Fig. 1 — Consistency boundaries of fund: one box per aggregate — title = root, rows = member entities. Everything inside a box commits in one database transaction; everything between boxes flows through domain events.ภาพที่ 1 — ขอบเขตความสอดคล้องของ fund: หนึ่งกล่องต่อ aggregate — ชื่อกล่อง = root, รายการในกล่อง = entity สมาชิก ทุกอย่างในกล่อง commit ใน database transaction เดียว; ระหว่างกล่องไหลผ่าน domain event
Aggregate rootMembersสมาชิกContextTransaction ruleกติกา transactionDataข้อมูล
CaneSugarFundCaneSugarFund · FundContribution · FundCompensationfundContributions and compensations post against the running season balance in one transaction; shortfall flags derive from closing_balance (WF-44); reads statutory facts only (NFR-29).เงินสมทบและเงินชดเชย post เข้ายอดคงเหลือประจำฤดูใน transaction เดียว; ธงขาดสภาพคล่องคำนวณจาก closing_balance (WF-44); อ่านเฉพาะข้อเท็จจริงตามกฎหมาย (NFR-29)ERD-GOV-OCSF
FundLevyRateFundLevyRatefundRates append-only supersede by effective_from; authorized by the Board (FR-111).อัตรา append-only แทนที่ตาม effective_from; อนุมัติโดยบอร์ด กอน. (FR-111)ERD-GOV-OCSF

4. Component lifetime map4. ผัง lifetime ของ component

The DI registration contract for this perspective's contexts, from graph dataModeling.lifecycles — vocabulary singleton | scoped (per request / unit of work) | transient (.NET, per the PROP-005 ASP.NET Core foundation). Platform-wide conventions (DbContext, repositories, handlers, caches, hosted jobs) are stated once in SPEC-DDD and bind here unless a row below overrides them; the rows list the notable components an implementation must wire per context.

สัญญาการลงทะเบียน DI ของ context ในมุมมองนี้ จาก dataModeling.lifecycles ใน graph — ใช้ศัพท์ singleton | scoped (ต่อคำขอ / unit of work) | transient (.NET ตามรากฐาน ASP.NET Core ของ PROP-005) กติการวมทั้ง platform (DbContext, repository, handler, cache, hosted job) ประกาศครั้งเดียวใน SPEC-DDD และมีผลที่นี่เว้นแต่แถวด้านล่างกำหนดต่าง; แถวในตารางคือ component สำคัญที่ implementation ต้องต่อสายราย context

fund กองทุนอ้อยและน้ำตาลทราย

events producedevent ที่ผลิต FundLevyRateSet · FundContributionPosted · FundCompensationAccrued · FundCompensationPaid · FundShortfallFlagged

ComponentKindชนิดLifetimeRationaleเหตุผล
FundRepositoryrepositoryscoped—
LevyCalculatorcalculatortransientbasis (cane tonnage AND produced sugar; by-products excluded) × rate.ฐาน (ตันอ้อย และ น้ำตาลที่ผลิต; ไม่รวมผลพลอยได้) × อัตรา
CompensationAgingJobhosted_servicesingletonArticle 56 queue aging; shortfall flag WF-44.อายุคิวเงินชดเชยมาตรา 56; ธงขาดสภาพคล่อง WF-44

5. Related documents5. เอกสารที่เกี่ยวข้อง

Revision historyประวัติการแก้ไข

RevฉบับDateวันที่Changeการเปลี่ยนแปลง
0.2.02026-07-12New OCSF perspective family (PROP-015). Capacity fund→ocsf; content promoted from the SPEC-DDD master (PROP-013). Prototype at apps/ocsf/.ตระกูลมุมมอง OCSF ใหม่ (PROP-015) capacity fund→ocsf; เนื้อหายกจากเอกสารหลัก SPEC-DDD (PROP-013) ต้นแบบที่ apps/ocsf/
0.3.02026-07-13PROP-018 P2 (spec v0.4.0): aggregate map figure + normative aggregate boundaries & transaction rules (Section 3) and the DI component lifetime map (Section 4) for fund — rendered from the graph's dataModeling block (aggregates · lifecycles).PROP-018 P2 (spec v0.4.0): ภาพผัง aggregate + ขอบเขต aggregate และกติกา transaction เชิงบรรทัดฐาน (ข้อ 3) และผัง lifetime ของ component แบบ DI (ข้อ 4) ของ fund — render จาก block dataModeling ใน graph (aggregates · lifecycles)
0.4.02026-08-03PROP-073 (spec v0.47.0): one word — Tenant. Party → Tenant, party_id (and every prefixed form) → tenant_id, PartyCapacity/PartyQualification/PartyFounded → Tenant*, party context/switcher → tenant context/switcher, cross-party → cross-tenant, organisation → organization, and ผู้เล่น retired as the Thai gloss (the Latin word tenant instead, R-THAI). Hold list untouched: counterparty · third party · tripartite working group · Person*/person_id; display codes and token claims were held by R-NULL for one release and then MOVED at v0.47.1 on client decision (C-1), because no token has ever been SIGNED — no auth exists in the built ocsb/ocsf prototypes — and the only printed codes were eight fixture strings in apps/ocsf/fund-shell.jsx, swept in the same pass: PTY- → TNT-, TCA- → TCA-, TQL- → TQL-, claim tnt → tnt, claim dep → dep. Carried in the same pass: the PROP-075 rectification — the retired directory noun domain becomes department (A-82 R-ONETREE) and the dangling A-86/A-87/A-88 citations are re-pointed at the ids they were actually given, A-81/A-82/A-83.PROP-073 (spec v0.47.0): คำเดียว — Tenant Party → Tenant, party_id ทุกรูป → tenant_id, PartyCapacity/PartyQualification/PartyFounded → Tenant*, cross-party → cross-tenant และเลิกใช้ ผู้เล่น เป็นคำแทนวัตถุนี้ในภาษาไทย (ใช้คำละติน tenant ตาม R-THAI) รายการห้ามแตะไม่ถูกแตะ: คู่สัญญา · third party · คณะทำงานไตรภาคี · Person*/person_id รอบเดียวกันแก้ค้างจาก PROP-075: domain → department (A-82) และแก้การอ้าง A-86/A-87/A-88 ที่ไม่มีอยู่จริงเป็น A-81/A-82/A-83
0.4.12026-08-03PROP-073 PATCH 1 (spec v0.47.1 / v0.47.2 / v0.47.3 as applicable): the identifiers v0.47.0 had held, moved on client decision. PTY-######## → TNT-######## · PCA-######## → TCA-######## · PQL-######## → TQL-######## · token claim pty → tnt · token claim dom → dep (v0.47.1, C-1 — R-NULL had held them as a stored VALUE and a wire format; reversed because no token has ever been signed and the only printed codes were fixture strings). quota_org_officer → quota_officer · lead_org_officer → lead_officer (v0.47.2, C-2 — org is organization abbreviated, not a resemblance). The retired role LABEL swept as a phrase family and quota organization naming the tenant → quota group / กลุ่มโควตา (v0.47.3). All retired forms are in the FR-396 crosswalk and refused in new text by NFR-142.PROP-073 PATCH 1 (spec v0.47.1 / v0.47.2 / v0.47.3 ตามที่เกี่ยวข้อง): ตัวระบุที่ v0.47.0 คงไว้ ถูกย้ายตามการตัดสินของลูกค้า PTY- → TNT- · PCA- → TCA- · PQL- → TQL- · claim pty → tnt · claim dom → dep (v0.47.1, C-1) · quota_org_officer → quota_officer · lead_org_officer → lead_officer (v0.47.2, C-2) · ป้ายชื่อบทบาทที่เลิกใช้และ องค์กรโควตา ที่เรียก tenant → กลุ่มโควตา (v0.47.3) ทุกรูปที่เลิกใช้อยู่ในตารางแปลง FR-396