Cane Agency · Specification · Platform operatorสถาบันอ้อย · เอกสารข้อกำหนด · ผู้ให้บริการ platform
This document reads the department from the platform-operator perspective (PROP-006): the platform_ops bounded context, its aggregates and invariants, the events it publishes, and the ubiquitous language of admission and stewardship. The governing architecture is a separation of powers: platform_ops orchestrates admission but never writes identity — capacity grants and tenant edits are commanded through federation, the sole identity writer (SPEC-DDD-FED Section 3). Definitions mirror SPEC-DDD and the graph.
เอกสารนี้อ่านหน่วยงานจากมุมมองผู้ให้บริการ platform (PROP-006): บริบท platform_ops แอกกริเกตและกฎคงที่ เหตุการณ์ที่ปล่อย และภาษากลางของการรับเข้าและการดูแลตัวแทน สถาปัตยกรรมหลักคือการแยกอำนาจ: platform_ops ประสานการรับเข้าแต่ไม่เขียนอัตลักษณ์ — การให้ capacity สั่งผ่าน federation ผู้เขียนอัตลักษณ์รายเดียว
| Ownsเป็นเจ้าของ | Invitation · representative-tenant stewardship · platform configuration authoring · monitoring read-models · the certified hardware program · the billing configuration (BillingProfile · BillingProfileAssignment, v0.81.0 A-116) |
| Calls (never bypasses)เรียกใช้ (ไม่ข้าม) | federation (the sole identity writer — grants capacities, edits tenants)(ผู้เขียนอัตลักษณ์รายเดียว) |
| Authors (owned elsewhere)กำหนดค่า (เป็นของบริบทอื่น) | Season (quota_planning) · CanePriceAnnouncement (regulation) · catalog versions & feature flagsSeason (quota_planning) · CanePriceAnnouncement (regulation) · รุ่น catalog (แคตตาล็อก) & feature flag |
| Surfaceช่องทาง | admin (the ninth surface; view-as X4 hosted here)(ช่องทางที่เก้า; view-as X4 โฮสต์ที่นี่) |
| WorkflowsWorkflow | WF-28 · WF-29 · WF-30 · WF-25 · WF-27 · WF-152 |
The critical invariant. When an Invitation is accepted (WF-28), platform_ops validates the ticket and the per-capacity verification, then commands federation to grant the TenantCapacity — it does not write TenantCapacity itself. Likewise a representative-mill claim (WF-29) commands federation to attach the real person(s) and flip representation → real. This keeps one writer for identity (auditability, NFR-15 compiler bind) while giving the operator a home for admission logic. Support access stays a federation mechanism (X4, audited view-as); platform_ops only hosts its UI.
กฎคงที่สำคัญ เมื่อ Invitation ถูกรับ (WF-28) platform_ops ตรวจบัตรและการยืนยันราย capacity แล้วสั่ง federation ให้ TenantCapacity — ไม่เขียน TenantCapacity เอง เช่นเดียวกับการอ้างสิทธิ์โรงงานตัวแทน (WF-29) สั่ง federation ผูกบุคคลจริงและพลิก representation → real จึงคงผู้เขียนอัตลักษณ์รายเดียว (ตรวจสอบได้ NFR-15) การเข้าถึงเพื่อสนับสนุนยังเป็นกลไก federation (X4)
| Aggregateแอกกริเกต | Invariantsกฎคงที่ |
|---|---|
| Invitation | Single-use token; an invitation-only capacity is grantable ONLY against an open, matching Invitation (FR-70); self-requests rejected at WF-25. Append-only status history; expiry auto-transitions to expired.token (โทเคน) ใช้ครั้งเดียว; capacity เข้าโดยการเชิญให้ได้เฉพาะเมื่อมี Invitation ที่เปิดและตรงกัน (FR-70); คำขอด้วยตนเองถูกปฏิเสธที่ WF-25 ต่อท้ายเท่านั้น |
| Representative tenant | Has an unclaimed person and no active sign-in (NFR-19); can be a delivery destination but cannot weigh/CCS/settle/consent until claimed; claiming preserves every id and link (FR-73).มีบุคคลยังไม่อ้างสิทธิ์ ลงชื่อไม่ได้ (NFR-19); เป็นปลายทางได้ แต่ชั่ง/CCS/ชำระ/ยินยอมไม่ได้จนกว่าจะถูกอ้างสิทธิ์; การอ้างสิทธิ์คงทุก id และลิงก์ (FR-73) |
| Operator capacity | Exclusive (NFR-18): an operator tenant holds no market capacity; reads another tenant's data only via consent (X1) or audited view-as (X4). Every admission/config action is dual-logged (operator tenant + operator person, NFR-20).เอกสิทธิ์ (NFR-18): tenant operator ไม่ถือ capacity ตลาด; อ่านข้อมูล tenant อื่นได้เฉพาะผ่านความยินยอม (X1) หรือ view-as (X4) ทุกการกระทำบันทึกคู่ (NFR-20) |
| BillingProfile | v0.81.0 (PROP-099), A-116. Root of the operator’s billing-customer aggregate, with BillingProfileAssignment as its member: the two exclusion constraints over the active interval and the coverage duty are invariants of the SAME transaction. A chargeable tenant has exactly one live assignment, written in the commit of the act that makes it chargeable or the act is refused; a REPLACE closes the incumbent and opens the successor in one commit; live is a date interval and never a stored flag; both actors of every transition are distinct authorized Cane operators (four_eyes, no_self_approval). Two profile states only, active and closed, and the status is never read to grant, withhold, suspend or restore a capacity. It writes nothing in a tenant tree — the four source references are recorded identifiers resolved inside the tenant before the command crosses.v0.81.0 (PROP-099), A-116 เป็นรากของ aggregate ลูกค้าที่ถูกเรียกเก็บฝั่งผู้ดำเนินการ โดยมี BillingProfileAssignment เป็นสมาชิก คือ exclusion constraint สองข้อบนช่วงที่ active และหน้าที่เรื่องการครอบคลุมเป็นข้อคงสภาพของธุรกรรม เดียวกัน tenant ที่ต้องถูกเรียกเก็บมีการผูกที่ใช้งานหนึ่งพอดี เขียนในธุรกรรมของการกระทำที่ทำให้ต้องถูกเรียกเก็บ หรือปฏิเสธการกระทำนั้น การแทนปิดแถวเดิมและเปิดแถวใหม่ในหนึ่งธุรกรรม ใช้งานคือช่วงวันที่ ไม่ใช่ค่าที่เก็บไว้ ผู้กระทำทั้งสองของการเปลี่ยนสถานะทุกครั้งเป็นผู้ดำเนินการของ Cane ที่มีสิทธิ์และต่างกัน (four_eyes · no_self_approval) profile มีสองสถานะเท่านั้น คือ active และ closed และสถานะนั้นไม่ถูกอ่านเพื่อให้ ระงับ พัก หรือคืนความสามารถ มันไม่เขียนสิ่งใดในต้นไม้ของ tenant ตัวอ้างอิงที่มาทั้งสี่เป็นตัวระบุที่บันทึกไว้ ซึ่งสืบค้นภายใน tenant ก่อนคำสั่งจะข้ามมา |
The normative consistency boundaries of this perspective's home context (platform_ops), 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 อยู่มุมมองนี้ (platform_ops) render จาก dataModeling.aggregates ใน graph (v0.4.0, PROP-018) คำอธิบาย invariant ข้างบนคงไว้เพื่อความเข้าใจ; กติกาในส่วนนี้คือสัญญาเชิง transaction ที่ implementation ต้องบังคับใช้ ส่วน persistence ระดับ column ของ entity สมาชิกทุกตัวอยู่ในตระกูล SPEC-ERD พี่น้อง (ดู column ข้อมูล)
| Aggregate root | Membersสมาชิก | Context | Transaction ruleกติกา transaction | Dataข้อมูล |
|---|---|---|---|---|
| Invitation | Invitation | platform_ops | Admission ticket; acceptance is a cross-context saga — the federation capacity grant commits separately and references invitation_id (WF-25/28).บัตรเชิญรับเข้า; การตอบรับเป็น saga ข้าม context — การให้ capacity ใน federation commit แยกและอ้าง invitation_id (WF-25/28) | ERD-OPS |
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
| Component | Kindชนิด | Lifetime | Rationaleเหตุผล |
|---|---|---|---|
| InvitationRepository | repository | scoped | — |
| AdmissionOrchestrator | app_service | scoped | WF-25/28 saga — commands federation, never writes identity itself.saga WF-25/28 — สั่งงาน federation ไม่เขียนอัตลักษณ์เอง |
| InvitationTokenFactory | factory | transient | Issues token_hash; single-use semantics enforced at accept.ออก token_hash; ใช้ครั้งเดียว บังคับตอนตอบรับ |
| RepresentativeMillSteward | app_service | scoped | WF-29 claim preserves mill_id and every link.การ claim ตาม WF-29 คง mill_id และทุกการเชื่อมโยง |
| Eventเหตุการณ์ | Consumersผู้บริโภค |
|---|---|
| InvitationIssued / Accepted / Revoked / Expired | Federation (consumes Accepted to grant), Account, Notifications, AuditFederation (รับ Accepted เพื่อให้ capacity), Account, การแจ้งเตือน, Audit |
| MillRepresented / MillClaimed | Quota & Planning, Mill, Mobile, Notifications, Audit — mirrors VirtualFarmerCreated/ConvertedQuota & Planning, Mill, มือถือ, การแจ้งเตือน, Audit — สะท้อน VirtualFarmerCreated/Converted |
| PlatformConfigChanged | The relevant home context (Quota & Planning · Regulation · Federation) + Audit — dual-logged (NFR-20)บริบทบ้านที่เกี่ยวข้อง + Audit — บันทึกคู่ (NFR-20) |
| BillingProfileConfigured / ContactAmended / BillToAmended / Closed | Account, Admin, Audit — and PROP-100, which consumes and produces none. Every one except the contact event carries both the submitter and the approver (A-116, v0.81.0)Account, Admin, Audit และ PROP-100 ซึ่งบริโภคและไม่ผลิตเลย ทุกตัวยกเว้นเหตุการณ์ผู้ติดต่อถือทั้งผู้ยื่นและผู้อนุมัติ (A-116, v0.81.0) |
| BillingProfileAssigned / AssignmentScheduled / AssignmentClosed / AssignmentCancelled | Account, Admin, Audit — and PROP-100. A REPLACE emits exactly AssignmentClosed then Assigned on one correlation id and no replacement event of its own (FR-610)Account, Admin, Audit และ PROP-100 การแทนส่ง AssignmentClosed แล้ว Assigned พอดี บนรหัสเชื่อมโยงเดียว และไม่มีเหตุการณ์การแทนของตัวเอง (FR-610) |
| Thaiไทย | Englishอังกฤษ | Meaningความหมาย |
|---|---|---|
| ผู้ให้บริการ platform | operator / platform operator | Cane Agency as a tenant — exclusive operator capacity on the admin surface.สถาบันอ้อยในฐานะ tenant — capacity operator เอกสิทธิ์บนช่องทาง admin |
| ระดับการรับเข้า | admission class | self_serve | invitation on a capacity — how a tenant gets in (orthogonal to exclusivity).self_serve | invitation บน capacity — วิธีที่ tenant เข้ามา |
| คำเชิญ | Invitation | The operator-issued, single-use admission ticket for an invitation-only capacity.บัตรรับเข้าใช้ครั้งเดียวที่ผู้ให้บริการออก |
| โรงงานตัวแทน | representative mill | A platform-stewarded, not-yet-joined mill a grower can already deliver to; claiming preserves mill_id.โรงงานที่ platform ดูแลและยังไม่เข้าร่วม ชาวไร่ส่งมอบได้แล้ว; อ้างสิทธิ์คง mill_id |
| ค่าตั้งผู้รับใบแจ้งหนี้ | billing profile | The counterparty the PLATFORM invoices — operator-owned, current configuration only, with no tenant of its own and no figure in it.คู่สัญญาที่แพลตฟอร์มออกใบแจ้งหนี้ให้ ผู้ดำเนินการเป็นเจ้าของ เป็นค่าตั้งปัจจุบันเท่านั้น ไม่มี tenant ของตัวเอง และไม่มีตัวเลขในนั้น |
| การผูก billing profile กับ tenant | billing profile assignment | The dated relationship that makes one tenant billable from one profile; live is a closed interval, never a flag, and only an operator writes it.ความสัมพันธ์ที่มีวันที่ทำให้ tenant หนึ่งถูกเรียกเก็บจาก profile หนึ่ง ใช้งานคือช่วงปิด ไม่ใช่ค่าบูลีน และมีเพียงผู้ดำเนินการเขียน |
| การครอบคลุมการเรียกเก็บ | billing coverage | Exactly one live assignment for every day a tenant is chargeable — created with the charge, and a gap is a finding rather than a permitted state.การผูกที่ใช้งานหนึ่งพอดีทุกวันที่ tenant ต้องถูกเรียกเก็บ สร้างพร้อมการเรียกเก็บ และช่องว่างเป็นผลค้นพบ ไม่ใช่สถานะที่ยอมให้คงอยู่ |
| Rev | Dateวันที่ | Changesการเปลี่ยนแปลง |
|---|---|---|
| 1.0 | 2026-07-08 | Initial version — PROP-006 (OPS, spec v7.0): operator perspective of the department — the platform_ops context, the orchestration-vs-identity-writer architecture, aggregates & invariants, 7 events, and the operator/admission ubiquitous language.ฉบับแรก — PROP-006 (OPS, spec (สเปก) v7.0): มุมมองผู้ให้บริการต่อหน่วยงาน — บริบท platform_ops สถาปัตยกรรมประสาน-เทียบ-ผู้เขียนอัตลักษณ์ แอกกริเกตและกฎคงที่ 7 เหตุการณ์ และภาษากลาง operator/admission |
| 0.1.0 | 2026-07-11 | PROP-014 (spec v0.1.0): semantic versioning restarted at 0.1.0 (was Rev 1.0 · 2026-07-08); docnav updated for the gov_cluster split — GOV re-homed to docs/gov/ocsb/, new BOARD (กอน.) sibling added.PROP-014 (spec v0.1.0): รีสตาร์ท semantic versioning ที่ 0.1.0 (เดิม Rev 1.0 · 2026-07-08); ปรับ docnav ตามการแยก gov_cluster — ย้าย GOV ไป docs/gov/ocsb/ เพิ่มพี่น้อง BOARD (กอน.) |
| 0.2.0 | 2026-07-13 | PROP-018 P2 (spec v0.4.0): aggregate map figure + normative aggregate boundaries & transaction rules (Section 5) and the DI component lifetime map (Section 6) for platform_ops — rendered from the graph's dataModeling block (aggregates · lifecycles).PROP-018 P2 (spec v0.4.0): ภาพผัง aggregate + ขอบเขต aggregate และกติกา transaction เชิงบรรทัดฐาน (ข้อ 5) และผัง lifetime ของ component แบบ DI (ข้อ 6) ของ platform_ops — render จาก block dataModeling ใน graph (aggregates · lifecycles) |
| 0.3.0 | 2026-08-03 | PROP-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.3.1 | 2026-08-03 | PROP-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 |
| 0.4.0 | 2026-08-20 | PROP-099 approved & applied — spec v0.81.0: the billing configuration enters platform_ops. The context Owns row gains BillingProfile and BillingProfileAssignment on the A-116 OQ-1 decision of 20 Aug 2026 — the EXISTING context, no new context and no BillingCustomer entity. Section 4 gains the BillingProfile aggregate and its invariants; Section 7 gains the eight domain events; Section 8 gains three terms; WF-152 joins the workflow row. This context holds no commerce EXECUTION: subscriptions, invoices, payments and collections are PROP-100’s, and its service and context are that document’s own open question.PROP-099 อนุมัติและ apply แล้ว — spec v0.81.0 ค่าตั้งการเรียกเก็บเข้าสู่ platform_ops แถว เป็นเจ้าของ ของบริบทเพิ่ม BillingProfile และ BillingProfileAssignment ตามคำตัดสิน OQ-1 ของ A-116 วันที่ 20 ส.ค. 2569 คือบริบทที่มีอยู่ ไม่สร้าง context ใหม่ และไม่มีเอนทิตี BillingCustomer ข้อ 4 เพิ่ม aggregate BillingProfile และข้อคงสภาพ ข้อ 7 เพิ่ม เหตุการณ์โดเมนแปดตัว ข้อ 8 เพิ่มคำสามคำ และ WF-152 เข้าแถว workflow บริบทนี้ไม่ถือการดำเนินการเชิงพาณิชย์ คือการสมัครใช้ ใบแจ้งหนี้ การชำระ และการเรียกชำระ เป็นของ PROP-100 และบริการกับ context ของมันเป็นคำถามเปิดของเอกสารนั้นเอง |