SPEC-ERD-PLT Rev 0.7.0 · 2026-08-18

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

Entity Model — Platform Intelligence & Shared Master Dataแบบจำลอง entity — ข่าวกรองระดับ platform และข้อมูลหลักที่ใช้ร่วมกัน

Documentเอกสาร
SPEC-ERD-PLT
Versionversion (เวอร์ชัน)
0.7.0
Scopeขอบเขต
plt · 11 owned entitiesentity ที่เป็นเจ้าของ
Updatedปรับปรุงล่าสุด
2026-08-18
Masterเอกสารหลัก
SPEC-ERD

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

The Platform Intelligence (PLT) perspective of SPEC-ERD, created by PROP-046 (spec v0.18.0). PLT owns the entities of the farmer_reliability context (re-homed from the mill family per OQ-3) and, since spec v0.20.0 (PROP-025), the fleet_intelligence context — the anchor tenant. The graph (perspectives.plt) is the source; MILL/CFC/CFQ render shared views.

มุมมอง ข่าวกรองระดับ platform (PLT) ของ SPEC-ERD สร้างโดย PROP-046 (spec (สเปก) v0.18.0) PLT เป็นเจ้าของ entity ของ context farmer_reliability (ย้ายบ้านจากตระกูลโรงงานตาม OQ-3) และตั้งแต่ spec v0.20.0 (PROP-025) เป็นเจ้าของ context fleet_intelligence — ผู้อยู่อาศัยหลัก graph (กราฟ) (perspectives.plt) เป็นแหล่งข้อมูล; MILL/CFC/CFQ render มุมมองที่ใช้ร่วม

2. Owned entities — farmer_reliability2. Entity ที่เป็นเจ้าของ — farmer_reliability

EntityEntityRole in the modelบทบาทในแบบจำลอง
ReliabilityEventAppend-only, machine-written booking-outcome fact (on_time · late_demoted + minutes · no_show · cancelled_in_time · excused) with full attribution (quota tenant, acting sub-farmer, truck own/hired, contractor). Mill-scoped rows — the tenant wall's ground truth. v0.30.0 (PROP-052): +lead_tenant_id? · lead_mandate_id? — the lead farmer and mandate in force when the outcome occurred, stamped by the slot machinery with the rest of the attribution and never resolved live (FR-316); unreachable in v1 (NFR-109).ข้อเท็จจริงผลการจองแบบ append-only เขียนโดยระบบ (ตรงเวลา · สายถูกลดคิว + นาที · ไม่มา · ยกเลิกทัน · ยกเว้น) พร้อมการระบุที่มาครบ แถวเป็นระดับโรงงาน — ความจริงพื้นฐานของกำแพง tenant v0.30.0 (PROP-052): +lead_tenant_id? · lead_mandate_id? — หัวตันและ mandate ที่มีผลขณะเกิดผลลัพธ์ เขียนโดยกลไก slot พร้อมการผูกอื่น ๆ ไม่ resolve สด (FR-316) และเข้าไม่ถึงใน v1 (NFR-109)
ReliabilityScoreThe platform-wide 0–100 score: one per scored tenant per perspective (mill | chain | contractor) per season — a read model recomputed from the event log, byte-identical on full recompute. Never reset by switching mills. PDPA personal.คะแนน 0–100 ระดับ platform: หนึ่งต่อ tenant ต่อมุมมอง (mill | chain | contractor) ต่อฤดู — read model ที่คำนวณซ้ำจากบันทึกเหตุการณ์ได้ผลตรงกันทุก byte ไม่ reset เมื่อย้ายโรงงาน เป็นข้อมูลส่วนบุคคลตาม PDPA
ScoringPolicyThe operator-published, versioned formula (deltas, decay, seed 70, season 50/50 carry-over) — deterministic, farmer-recomputable, no ML in the score.สูตรที่ operator เผยแพร่และมี version (ค่าปรับ การเสื่อมค่า ค่าตั้งต้น 70 การยกยอดฤดู 50/50) — deterministic ชาวไร่คำนวณซ้ำได้ ไม่มี ML ในตัวคะแนน
BookingPrivilegePolicyPer-mill B-0…B-3 band definitions and their privileges (booking horizon, concurrent cap, suspension) — bands are mill policy over the platform score; walk-in never gated.นิยามช่วงชั้น B-0…B-3 รายโรงงานและสิทธิ์ (กรอบเวลาจอง เพดานพร้อมกัน การพักสิทธิ์) — ช่วงชั้นเป็นนโยบายโรงงานเหนือคะแนน platform; walk-in ไม่ถูกกั้น
SeasonContext ★New v0.30.0 (PROP-052). Append-only platform record of an exogenous season condition over an area and a period — cause (flood · drought · pest · disease · frost · road_closure · mill_stoppage · other), severity, effective period, named external source and declared_at. Default grain tumboon (ตำบล) on the PROP-047 closed registries (OQ-1 decided); platform-authored only (OQ-2). Carries no verdict and feeds no score — it exists so a bad district can never later read as a bad lead.ใหม่ v0.30.0 (PROP-052) ระเบียน append-only ของสภาพภายนอกในพื้นที่และช่วงเวลาหนึ่ง — สาเหตุ (น้ำท่วม · แล้ง · ศัตรูพืช · โรค · น้ำค้างแข็ง · ถนนปิด · โรงงานหยุด · อื่น ๆ) ความรุนแรง ช่วงที่มีผล แหล่งที่มาภายนอกที่ระบุชื่อ และ declared_at ค่าเริ่มต้นระดับตำบล บนทะเบียนปิดของ PROP-047 (ตัดสิน OQ-1); platform เขียนเท่านั้น (OQ-2) ไม่ตัดสินสิ่งใดและไม่ป้อนคะแนน — มีไว้เพื่อไม่ให้อำเภอที่แย่ถูกอ่านว่าเป็นหัวตันที่แย่ในภายหลัง
SuspensionSpell ★ ช่วงพักสิทธิ์จองThe B-0 spell as a record (v0.31.0, PROP-036 Part 1): one row per spell of one tenant at ONE mill, spell_no driving the published escalation ladder (FR-318) and the scope rule making non-propagation structural (FR-319) — never across a group, never up or down a quota or lead network, walk-in never gated.ช่วงพัก B-0 ในรูประเบียน (v0.31.0, PROP-036 ส่วนที่ 1): หนึ่งแถวต่อหนึ่งช่วงพักของ tenant เดียวที่โรงงานเดียว spell_no ขับบันไดที่ประกาศไว้ (FR-318) และกติกาขอบเขตทำให้การไม่ส่งผลข้ามเป็นเรื่องโครงสร้าง (FR-319)

Release tags belong to artifacts, not containers (v0.40.0, PROP-064 OQ-4). The farmer_reliability context no longer carries a container-level release: v2 tag — the five deferred entities carry their own (ReliabilityEvent · ReliabilityScore · ScoringPolicy · BookingPrivilegePolicy · SuspensionSpell). Tagging the container had deferred two v1 members nobody voted to defer, SeasonContext and BenchmarkCohort, along with FR-317 and NFR-109. A context is a domain boundary; release is a property of artifacts (A-66).

ป้ายรุ่นเป็นของ artifact ไม่ใช่ของภาชนะ (v0.40.0, PROP-064 OQ-4) context farmer_reliability ไม่ถือป้าย release: v2 ระดับภาชนะอีกต่อไป — entity ที่เลื่อนทั้งห้าตัวถือป้ายของตนเอง (ReliabilityEvent · ReliabilityScore · ScoringPolicy · BookingPrivilegePolicy · SuspensionSpell) การติดป้ายที่ภาชนะได้เลื่อนสมาชิก v1 สองตัวที่ไม่มีใครลงมติให้เลื่อน คือ SeasonContext และ BenchmarkCohort พร้อมกับ FR-317 และ NFR-109 context คือขอบเขตโดเมน ส่วน release เป็นคุณสมบัติของ artifact (A-66)

SeasonContext relationships: Season 1 — 0..* SeasonContext; scope is a PROP-047 registry code, not an entity edge. No delivery, event or score references a context in v1 — the join is a future analytical act, deliberately not a stored link.

ความสัมพันธ์ของ SeasonContext: Season 1 — 0..* SeasonContext; ขอบเขตเป็นรหัสทะเบียน PROP-047 ไม่ใช่เส้นความสัมพันธ์ ใน v1 ไม่มีการส่งมอบ เหตุการณ์ หรือคะแนนใดอ้างถึงบริบท — การเชื่อมเป็นการวิเคราะห์ในอนาคต ไม่ใช่ link ที่เก็บไว้

Key relationship: Tenant 1 — 0..* ReliabilityScore (per perspective per season). Shared reads: QueueTicket and TimeSlot outcomes feed the event log via the gate_queue context.

ความสัมพันธ์หลัก: Tenant 1 — 0..* ReliabilityScore (ต่อมุมมองต่อฤดู) การอ่านที่ใช้ร่วม: ผลของ QueueTicket และ TimeSlot ป้อนบันทึกเหตุการณ์ผ่าน context gate_queue

Persistence profilesPersistence profile BenchmarkCohort's and SeasonContext's profiles are authored below (physical-model batch 1, spec v0.28.1; SeasonContext authored inside its own application pass per authority rule 6, spec v0.30.0). The remaining eight owned entities' physical profiles (table, keys, indexes, mutability, PDPA class) clear in the approved backlog batches (authority rule 6); when authored they home in this document (dataModeling.entities[].home = SPEC-ERD-PLT). The re-keyed factory Truck profile (unique mill_id, reg_no_norm, province) homes in SPEC-ERD-MILL. profile ของ BenchmarkCohort และ SeasonContext เขียนไว้ด้านล่างแล้ว (ก้อนที่ 1, spec v0.28.1; SeasonContext เขียนในรอบ apply ของตนเองตามกติกาอำนาจข้อ 6, spec v0.30.0) ส่วนอีกแปดตัวจะทยอยเคลียร์ตามก้อนที่อนุมัติแล้ว (กติกาอำนาจข้อ 6); เมื่อเขียนแล้วจะมีบ้านในเอกสารนี้ (dataModeling.entities[].home = SPEC-ERD-PLT) ส่วน profile ของ Truck ฝั่งโรงงานที่เปลี่ยนคีย์ (ไม่ซ้ำ mill_id, reg_no_norm, จังหวัด) มีบ้านใน SPEC-ERD-MILL

3. Owned entities — fleet_intelligence (PROP-025, spec v0.20.0)3. Entity ที่เป็นเจ้าของ — fleet_intelligence (PROP-025, spec v0.20.0)

EntityEntityRole in the modelบทบาทในแบบจำลอง
MasterTruckThe operator-owned, DERIVED national truck identity (M2): computed over factory Truck rows, canonical attributes recomputed by majority evidence, deleted when its last link goes — no independent life. seed_truck_id preserves the pre-migration global truck_id (OQ-8). status: active | merged | split. No tenant read/write surface ever (M1, NFR-55).อัตลักษณ์รถระดับประเทศที่เป็นผลลัพธ์ ของ operator (M2): คำนวณจากแถว Truck ของโรงงาน attribute มาตรฐานคำนวณใหม่ตามหลักฐานเสียงข้างมาก ลบเมื่อ link สุดท้ายหายไป seed_truck_id คง truck_id เดิมก่อน migration (OQ-8) status: active | merged | split ไม่มี surface อ่าน/เขียนฝั่ง tenant เด็ดขาด (M1, NFR-55)
TruckLinkEvidence-graded, reversible link (M3): tier (deterministic | probabilistic | manual) · confidence · signals · pipeline_version · linked_by. Exactly one linked row per factory truck; review-band rows sit in the ops-match queue. Launch thresholds (OQ-1): auto-link ≥ 0.97 with no conflicting signal, review 0.75–0.97, below → new master.link จัดชั้นตามหลักฐาน ย้อนกลับได้ (M3): ชั้น (deterministic | probabilistic | manual) · ความเชื่อมั่น · สัญญาณ · pipeline_version · ผู้เชื่อม แถว linked หนึ่งเดียวต่อรถโรงงาน; แถวช่วงตรวจทานอยู่ในคิว ops-match เกณฑ์เริ่มต้น (OQ-1): เชื่อมอัตโนมัติ ≥ 0.97 ไม่มีสัญญาณขัดแย้ง ตรวจทาน 0.75–0.97 ต่ำกว่า → master ใหม่
MasterPlatePeriodDeclared plate history on a master (OQ-4): source seed | declared; at most one open period per master; closes ONLY through an approved PlateChangeDeclaration — never inference. A suspected plate reissue resolves as a SPLIT, never an auto-merge.ประวัติป้ายแบบประกาศบน master (OQ-4): source seed | declared; ช่วงเปิดได้อย่างมากหนึ่งช่วงต่อ master; ปิดได้เฉพาะผ่าน PlateChangeDeclaration ที่อนุมัติแล้ว — ไม่อนุมานเด็ดขาด สงสัยออกป้ายซ้ำ → แยก (SPLIT) ไม่ผสานอัตโนมัติ
PlateChangeDeclarationThe chassis-backed, two-act plate-change artifact (OQ-4, WF-69): declared by a platform-tenant owner with the truck's chassis_id recorded; management-grade approval closes the old period and opens the new one on the SAME master. status: pending | approved | rejected.เอกสารแจ้งเปลี่ยนป้ายสองจังหวะอิงเลขตัวถัง (OQ-4, WF-69): แจ้งโดยเจ้าของที่เป็น tenant ของ platform และมี chassis_id บันทึกไว้; การอนุมัติระดับผู้บริหารปิดช่วงเก่าเปิดช่วงใหม่บน master เดิม status: pending | approved | rejected

Key relationships: MasterTruck 1 — 0..* TruckLink (link_count from linked rows) · MasterTruck 1 — 1..* MasterPlatePeriod · MasterTruck 1 — 0..* PlateChangeDeclaration · Truck 1 — 0..* TruckLink. Shared reads: Truck and Delivery (matching input, analytics). Factory-side, the WF-66 merge artifact TruckMergeRequest stays mill-owned (SPEC-ERD-MILL).

ความสัมพันธ์หลัก: MasterTruck 1 — 0..* TruckLink (link_count จากแถว linked) · MasterTruck 1 — 1..* MasterPlatePeriod · MasterTruck 1 — 0..* PlateChangeDeclaration · Truck 1 — 0..* TruckLink การอ่านที่ใช้ร่วม: Truck และ Delivery (input การจับคู่, analytics) ฝั่งโรงงาน เอกสารผสาน WF-66 TruckMergeRequest ยังเป็นของโรงงาน (SPEC-ERD-MILL)

4. Persistence profile — home entities4. Persistence profile — entity ที่ home อยู่ฉบับนี้

Normative physical model rendered from the graph's dataModeling block. Types derive from typeConventions (first rule wins); every FK is indexed by convention (ON DELETE RESTRICT) and listed indexes are additional.

Model เชิงกายภาพที่เป็นบรรทัดฐาน render จาก block dataModeling ใน graph ชนิดข้อมูลอนุมานจาก typeConventions ทุก FK มี index ตามข้อตกลง (ON DELETE RESTRICT)

BenchmarkCohort กลุ่มเปรียบเทียบ reference public

table benchmark_cohort  ·  aggregate BenchmarkCohort  ·  unique (cohort_key,season_id,metric)  ·  index (season_id,published) · (metric,season_id)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
cohort_keytext (region·soil_group·irrigation_class·crop_class·size_band)——PK
season_iduuid——PK
member_countinteger——
network_countinteger——
metrictext (enum)——PK
mediannumeric(14,2)——
p25numeric(14,2)——
p75numeric(14,2)——
publishedboolean——

SeasonContext บริบทฤดูกาล append_only operational

table season_context  ·  aggregate SeasonContext  ·  unique (season_id,scope_kind,scope_ref_id,cause,effective_from)  ·  index (season_id,scope_kind,scope_ref_id) · (cause,effective_from) · (declared_at)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
context_iduuid—uuid_v7()PK
season_iduuid——FK → season
scope_kindtext (enum)—tumboon
scope_ref_idinteger (PROP-047 registry code — 2-digit province · 4-digit amphor · 6-digit tumboon)——CHECK against the generated registryกับทะเบียนที่ generate
causetext (enum)——
severitytext (enum)——
effective_fromdate——
effective_todate✓—
sourcetext——
declared_byuuid——FK → membership
declared_attimestamptz—now()
notetext✓—

SuspensionSpell ช่วงพักสิทธิ์จอง immutable_after_state confidential_wall

table suspension_spell  ·  aggregate SuspensionSpell  ·  unique (tenant_id,mill_id,season_id,spell_no)  ·  index (tenant_id,mill_id,status) · (mill_id,started_at) · (ends_at,status)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
spell_iduuid—uuid_v7()PK
tenant_iduuid——FK → tenant
mill_iduuid——FK → mill
season_iduuid——FK → season
spell_nosmallint——ladder rung within ladder_window_seasonsขั้นบันไดในหน้าต่างเลื่อน
cause_scorenumeric(5,2)——the score at which the band closed bookingคะแนนขณะที่ชั้นปิดการจอง
started_attimestamptz—now()fixed at open (NFR-110)ตรึงตอนเปิด (NFR-110)
ends_attimestamptz——derived from the ladder at open; a later revision never lengthens itคำนวณจากบันไดตอนเปิด; การแก้บันไดภายหลังไม่ยืดช่วงพัก
statustext (enum: active | closed)—activePart 2 states (probation, lifted_early) deliberately absentสถานะของส่วนที่ 2 ไม่มีโดยเจตนา
EntityTableตารางPKUniqueuniqueIndexindexMutabilityPDPAProfileprofile
BenchmarkCohortbenchmark_cohortcohort_key,season_id,metric(cohort_key,season_id,metric)(season_id,published) (metric,season_id)referencepublicSection 4ข้อ 4
SeasonContextseason_contextcontext_id(season_id,scope_kind,scope_ref_id,cause,effective_from)(season_id,scope_kind,scope_ref_id) (cause,effective_from) (declared_at)append_onlyoperationalSection 4ข้อ 4
SuspensionSpellsuspension_spellspell_id(tenant_id,mill_id,season_id,spell_no)(tenant_id,mill_id,status) (mill_id,started_at) (ends_at,status)immutable_after_stateconfidential_wallSection 4ข้อ 4
Aggregate rootMembersสมาชิกContextTransaction ruleกติกา transaction
BenchmarkCohortBenchmarkCohortfarmer_reliabilityPublished only at k >= 7 holdings drawn from at least 3 quota networks; any cell failing either test shows nothing at all rather than a suppressed-but-inferable value (OQ-10). The reader's own holding is excluded from the basis, and mills and banks read exactly the medians every farmer reads.เผยแพร่เมื่อมีอย่างน้อย 7 ราย จากอย่างน้อย 3 เครือข่ายเท่านั้น เซลล์ที่ไม่ผ่านแสดงว่างเปล่า ไม่ใช่ค่าที่ปิดบังแต่เดาได้ (OQ-10) ไม่รวมแปลงของผู้อ่านเองในฐานคำนวณ และโรงงานกับธนาคารอ่านค่ามัธยฐานชุดเดียวกับที่ชาวไร่อ่าน
SeasonContextSeasonContextfarmer_reliabilityAppend-only and platform-authored: a declared context is never edited or deleted — a correction is a new row, and declared_at always renders beside the effective period so a retrospective entry can never pass as a contemporaneous one (FR-317, OQ-2). Scope rides the PROP-047 closed registries, default grain tumboon (OQ-1): no reference table, no FK, membership by CHECK against the generated registry.append-only และ platform เป็นผู้เขียน: บริบทที่ประกาศแล้วไม่แก้ไขและไม่ลบ — การแก้คือแถวใหม่ และ declared_at แสดงคู่กับช่วงที่มีผลเสมอ รายการย้อนหลังจึงไม่อาจผ่านตัวเป็นรายการร่วมสมัย (FR-317, OQ-2) ขอบเขตใช้ทะเบียนปิดของ PROP-047 ค่าเริ่มต้นระดับตำบล (OQ-1): ไม่มีตารางอ้างอิง ไม่มี FK ตรวจสมาชิกด้วย CHECK
SuspensionSpellSuspensionSpellfarmer_reliabilityOne spell per (tenant, mill, season, spell_no) and at most one active spell per (tenant, mill): opening a spell closes nothing else, closing it never edits its history, and started_at / ends_at are fixed at open so a ladder revision can never lengthen a running spell (NFR-110). The spell is mill-scoped — no transaction ever spans two mills or two tenants, which is what makes non-propagation structural rather than procedural (FR-319). Part 2 fields (rehabilitation credit, probation, early lift) are absent by design.หนึ่งช่วงพักต่อ (tenant, โรงงาน, ฤดู, ลำดับครั้ง) และมี active ได้ไม่เกินหนึ่งช่วงต่อ (tenant, โรงงาน): การเปิดไม่ปิดสิ่งอื่น การปิดไม่แก้ประวัติ และ started_at / ends_at ตรึงตอนเปิด บันไดที่แก้ภายหลังจึงยืดช่วงพักที่กำลังเดินไม่ได้ (NFR-110) ช่วงพักผูกรายโรงงาน ไม่มี transaction คร่อมสองโรงงานหรือสอง tenant จึงทำให้การไม่ส่งผลข้ามเป็นเรื่องโครงสร้าง (FR-319) ฟิลด์ของส่วนที่ 2 ไม่มีโดยเจตนา

5. The registration uniqueness index (PROP-084)5. ดัชนีความไม่ซ้ำของทะเบียน (PROP-084)

Applied 18 Aug 2026 as spec v0.75.0 (A-111 R-ONECLAIM; FR-495/FR-496; NFR-198/NFR-199; OQ-8 decided by the client 18 Aug 2026 — a narrow, blind, platform-operated index and no shared legal-identity table). PROP-075 OQ-7 ruled that two tenants may never hold the same registered body at the same time. That is the ONE constraint in the legal layer which must be evaluated across tenants, and a tenant-scoped table cannot carry it: a unique on DepartmentLegalProfile stops at the wall, and a shared identity table would put every tenant’s legal facts in one place to enforce one rule.

apply 18 ส.ค. 2569 เป็น spec v0.75.0 (A-111 R-ONECLAIM · FR-495/FR-496 · NFR-198/NFR-199 · OQ-8 ลูกค้าตัดสิน 18 ส.ค. 2569 คือดัชนีแคบที่มองไม่เห็นเนื้อข้อมูล และไม่มีตารางอัตลักษณ์ร่วม) PROP-075 OQ-7 กำหนดว่า tenant สองรายถือนิติบุคคลเดียวกันพร้อมกันไม่ได้ นี่เป็นข้อบังคับเดียวในชั้นนี้ที่ต้องประเมินข้าม tenant และตารางระดับ tenant รับไม่ได้

What it holds, and what it refuses. A closed column list: the normalized registration namespace and legal form, a protected one-way fingerprint of the registration number with the key version that produced it, the normalization version, three RECORDED REFERENCE VALUES naming the owning tenant, department and profile version, the claim’s dates, and audit provenance. It holds no raw registration number, no legal name, no tax id, no address, no document and no figure — the raw number lives only in the owning DepartmentLegalProfile, which remains the only source of legal-profile facts. It declares no tenant_id of its own, no hierarchy parent, no path and no grant scope; it is not browsable by any tenant, not a legal registry, not a party. The three owner values are recorded references and not enforced foreign keys, so the index resolves no tenant row and adds no fifth cross-tenant mechanism (NFR-65, NFR-195).

ถืออะไร และปฏิเสธอะไร คอลัมน์ชุดปิด: ปริภูมิชื่อทะเบียนและรูปแบบที่ทำเป็นมาตรฐานแล้ว fingerprint ทิศทางเดียวของเลขทะเบียนพร้อมรุ่นกุญแจ รุ่นการทำมาตรฐาน ค่าอ้างอิงที่บันทึกไว้สามค่า วันที่ของการอ้าง และที่มาสำหรับการตรวจสอบ ไม่มีเลขทะเบียนดิบ ชื่อนิติบุคคล เลขผู้เสียภาษี ที่อยู่ เอกสาร หรือตัวเลขใด ค่าอ้างอิงสามค่าไม่ใช่ foreign key จึงไม่เพิ่มกลไกข้าม tenant รายการที่ห้า

RegistrationUniquenessIndex ดัชนีความไม่ซ้ำของทะเบียน append_only operational

table registration_uniqueness_index  ·  aggregate RegistrationUniquenessIndex  ·  code RUX-########  ·  unique (registration_namespace,legal_form,registration_fingerprint — partial: WHERE is_live)  ·  index (claim_state) · (owner_tenant_ref) · (fingerprint_key_version)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
uniqueness_claim_iduuid—uuid_v7()PK
registration_namespacetext (registrar namespace)——UNIQUE (live)
legal_formtext (legalForms row id)——UNIQUE (live)
registration_fingerprintbytea (keyed one-way digest)——UNIQUE (live)
fingerprint_key_versiontext———
normalization_versiontext———
owner_tenant_refuuid——recorded reference — not a foreign key
owner_department_refuuid——recorded reference — not a foreign key
owner_legal_profile_refuuid——recorded reference — not a foreign key
claimed_fromdate———
released_ondate✓——
is_liveboolean—truethe partial-unique predicate — immutable
claim_statetext (enum: reserved | live | released | blocked_in_review)—reserved—
recorded_byuuid——FK → person — operator only
recorded_ontimestamptz—now()—
supersedes_claim_iduuid✓—FK → registration_uniqueness_index
evidence_reftext (document ref)✓—the operator act, not a legal document
statustext (enum: live | superseded | void)—live—

5.1 Normalization and the fingerprint5.1 การทำมาตรฐานและ fingerprint

Declared once, at legalLayer.uniquenessIndex, and versioned. Normalization norm-1: trim leading and trailing whitespace · remove separators and internal spaces · case-fold Latin characters · preserve leading zeros (A-105 R-THEIRNUMBER) · no digit parsed, no legal form inferred, no check digit computed. The fingerprint is a keyed one-way digest under a platform-held key (fpk-1): never reversed, never printed on a tenant surface, never used as an identifier anywhere else. Two numbers that normalize alike are the same claim by declaration; changing the rule is a change set with a re-derivation run reported to operator review BEFORE it runs, never an edit in place (NFR-199). A KEY ROTATION re-derives every live fingerprint in one recorded operator run and changes no identity, claim id, owner, date or state — a re-keying, never a re-registration — and each claim records the key version that produced it, so a partially rotated index is readable rather than ambiguous (NFR-198).

ประกาศครั้งเดียวที่ legalLayer.uniquenessIndex และมีรุ่น การทำมาตรฐาน norm-1: ตัดช่องว่างหัวท้าย ตัดตัวคั่นและช่องว่างภายใน ทำอักษรละตินเป็นพิมพ์เดียวกัน คงเลขศูนย์นำ ไม่แกะหลัก ไม่อนุมานรูปแบบ ไม่คำนวณหลักตรวจ ค่า fingerprint เป็นฟังก์ชันทิศทางเดียวใต้กุญแจที่แพลตฟอร์มถือ (fpk-1) การหมุนกุญแจคำนวณใหม่ในการรันเดียวที่บันทึกไว้ และไม่เปลี่ยนอัตลักษณ์ รหัส เจ้าของ วันที่ หรือสถานะใด

5.2 One transaction, and a collision that discloses nothing5.2 ธุรกรรมเดียว และการชนกันที่ไม่เปิดเผยอะไร

Opening a live legal profile that carries a registration_no, and every transfer of one between departments or tenants, runs as ONE serialized operator transaction (FR-495): normalize the number and derive its fingerprint at the declared versions → validate and reserve the claim → close the prior live claim with its release date → open the new claim and write the profile rows. One commit boundary: a failure at any step leaves no reserved fingerprint, no orphan claim and no half-transferred registration, while the released claim, the superseded profile version, its dates and its evidence all stay readable, both ends named in the FR-492 audit record.

การเปิด profile ที่มี registration_no และการย้ายทุกครั้ง ทำเป็นธุรกรรมเดียวที่เรียงลำดับ (FR-495): ทำมาตรฐานและคำนวณ fingerprint → ตรวจและจอง → ปิดการอ้างเดิมพร้อมวันปลด → เปิดการอ้างใหม่และเขียนแถว profile ใน commit เดียว

Where the fingerprint is already claimed live the write is refused, the profile is not activated, and an operator review case opens naming both claims (FR-496). The requesting tenant is told what happened in its own terms — this registration cannot be activated because it is recorded live elsewhere, and an operator is reviewing it — and is never told the other tenant, the other department, the other profile, its dates or any value belonging to it. The operator sees both sides and resolves it as a transfer to record or as a correction to one of the two profiles; a tenant may not resolve it, may not close the other claim, and has no query into the index at all. The index ENFORCES and never discloses, and it is enforced above the A-102 R-FORCEWALL policy, in the privileged position the wall itself is declared from (an A-96 R-STACK choice).

เมื่อ fingerprint ถูกอ้างใช้งานอยู่แล้ว การเขียนถูกปฏิเสธ profile ไม่เริ่มใช้งาน และเปิดเรื่องทบทวนที่ระบุการอ้างทั้งสอง (FR-496) tenant ผู้ขอไม่เคยทราบว่าเป็น tenant หน่วยงาน หรือ profile ใด ดัชนีบังคับกฎและไม่เปิดเผย

Read by V-20 leg (i) — the closed column list, no raw number, no name, no tax id, no tenant of its own, no hierarchy parent, no path, no grant scope, no tenant-facing read path, and exactly one live claim per (namespace, form, fingerprint) over an immutable liveness predicate — and by leg (d), which keeps the identifier grain honest.

อ่านด้วย V-20 ขา (ฌ) และขา (ง)

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

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

RevฉบับDateวันที่Changeการเปลี่ยนแปลง
0.2.02026-07-23PROP-025 applied (spec v0.20.0) — new Section 3: fleet_intelligence entities MasterTruck · TruckLink · MasterPlatePeriod · PlateChangeDeclaration + key relationships; pending-anchor-tenant section replaced; scope 4 → 8 owned entities; Truck re-key noted (profile homes in SPEC-ERD-MILL).apply PROP-025 (spec v0.20.0) — ข้อ 3 ใหม่: entity ของ fleet_intelligence MasterTruck · TruckLink · MasterPlatePeriod · PlateChangeDeclaration + ความสัมพันธ์หลัก; แทนข้อ“รอเข้า”; ขอบเขต 4 → 8 entity; บันทึกการเปลี่ยนคีย์ Truck (profile อยู่ SPEC-ERD-MILL)
0.1.02026-07-22Created by PROP-046 (spec v0.18.0). Takes ownership of the four farmer_reliability entities (OQ-3 graph-first re-homing); persistence profiles ride the Q5 back-audit. Applied alone by client instruction (OQ-5 sequencing overridden).สร้างโดย PROP-046 (spec v0.18.0) รับความเป็นเจ้าของ entity ทั้งสี่ของ farmer_reliability (ย้ายบ้านแบบ graph-first ตาม OQ-3); persistence profile ไปกับการตรวจย้อน Q5 apply เดี่ยวตามคำสั่งลูกค้า (ยกเว้นลำดับตาม OQ-5)
0.3.02026-07-28Physical-model batch 1 (spec v0.28.1) — new Section 3: persistence profile for BenchmarkCohort (v0.28.0, PROP-050 OQ-10) with its key row and consistency boundary — published only at k >= 7 holdings from at least 3 quota networks, the reader's own holding excluded, failing cells showing nothing rather than a suppressed-but-inferable value. The seven remaining owned entities clear in the approved backlog batches (authority rule 6). No model change.ก้อนที่ 1 ของแบบจำลองเชิงกายภาพ (spec v0.28.1) — ข้อ 3 ใหม่: persistence profile ของ BenchmarkCohort พร้อมแถวคีย์และขอบเขตความสอดคล้อง — เผยแพร่เมื่อมีอย่างน้อย 7 รายจาก 3 เครือข่ายเท่านั้น อีกเจ็ดตัวรอก้อนถัดไป ไม่มีการเปลี่ยนแบบจำลอง
0.4.02026-07-28PROP-052 applied (spec v0.30.0) — the lead-tier retention contract. Section 2 gains SeasonContext (append-only exogenous season conditions, default grain tumboon per OQ-1, platform-authored per OQ-2) and records the lead_tenant_id? / lead_mandate_id? snapshot columns on ReliabilityEvent; Section 3 gains the SeasonContext persistence profile, key row and consistency boundary (authored inside the application pass per authority rule 6). Scope 8 → 10 owned entities. The reference is retained but unreachable in v1 (NFR-109).apply PROP-052 (spec v0.30.0) — สัญญาการเก็บข้อมูลชั้นหัวตัน ข้อ 2 เพิ่ม SeasonContext (สภาพภายนอกแบบ append-only ค่าเริ่มต้นระดับตำบลตาม OQ-1 platform เขียนเท่านั้นตาม OQ-2) และบันทึกคอลัมน์ snapshot lead_tenant_id? / lead_mandate_id? บน ReliabilityEvent; ข้อ 3 เพิ่ม persistence profile แถวคีย์ และขอบเขตความสอดคล้องของ SeasonContext ขอบเขต 8 → 10 entity ข้อมูลถูกเก็บแต่เข้าไม่ถึงใน v1 (NFR-109)
0.5.02026-07-28PROP-036 Part 1 applied — spec v0.31.0. New home entity SuspensionSpell (Section 4) with its full column profile, summary row and consistency boundary (authority rule 6, profile written in the same change set); Section 2 gains the owned-entity row. Mill-scoped and confidential_wall; Part 2 fields deliberately unauthored.apply PROP-036 ส่วนที่ 1 — spec v0.31.0 เพิ่ม entity ที่ home ที่นี่ SuspensionSpell พร้อม profile คอลัมน์ครบ แถวสรุป และขอบเขตความคงเส้นคงวา (กติกาอำนาจข้อ 6); ข้อ 2 เพิ่มแถว entity ผูกรายโรงงานและจัดชั้น confidential_wall; ฟิลด์ของส่วนที่ 2 ไม่เขียนโดยเจตนา นอกจากนี้แก้เลขข้อที่ซ้ำ (persistence profile เป็นข้อ 4, เอกสารที่เกี่ยวข้องเป็นข้อ 5) และซิงก์ version ในเนื้อเอกสาร
0.5.12026-07-30PROP-064 applied — spec v0.40.0 (patch). Release-tag hygiene: the farmer_reliability context is no longer tagged release: v2 as a container — its five deferred entities carry their own tags, so SeasonContext (PROP-052) and BenchmarkCohort (PROP-050), both v1, no longer read as deferred. No model change.apply PROP-064 — spec v0.40.0 (patch) จัดระเบียบป้ายรุ่น: context farmer_reliability ไม่ถูกติดป้าย release: v2 ในระดับภาชนะอีกต่อไป — entity ที่เลื่อนทั้งห้าถือป้ายของตน จึงทำให้ SeasonContext (PROP-052) และ BenchmarkCohort (PROP-050) ซึ่งเป็น v1 ไม่ถูกอ่านว่าเลื่อน ไม่มีการเปลี่ยนแบบจำลอง
0.6.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.6.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
0.7.02026-08-18PROP-084 approved & applied — spec v0.75.0. New Section 5: RegistrationUniquenessIndex — the blind, operator-side device that enforces PROP-075 OQ-7’s one-live-registration rule without a shared legal-identity table and without a cross-tenant read. Its closed column list and refusal list, the versioned normalization and keyed fingerprint with its rotation contract, the single serialized claim transaction of FR-495, and the collision that blocks activation and discloses nothing (FR-496). Related documents → 6. A-111 R-ONECLAIM; NFR-198/NFR-199; read by V-20 legs (d) and (i).PROP-084 อนุมัติและ apply — spec v0.75.0 ข้อ 5 ใหม่: RegistrationUniquenessIndex อุปกรณ์ฝั่งผู้ดำเนินการที่มองไม่เห็นเนื้อข้อมูล บังคับกฎหนึ่งทะเบียนที่ใช้งานตาม PROP-075 OQ-7 โดยไม่มีตารางอัตลักษณ์ร่วมและไม่มีการอ่านข้าม tenant คอลัมน์ชุดปิดและรายการที่ปฏิเสธ การทำมาตรฐานที่มีรุ่นและ fingerprint ใต้กุญแจพร้อมสัญญาการหมุนกุญแจ ธุรกรรมเดียวที่เรียงลำดับตาม FR-495 และการชนกันที่ห้ามการเริ่มใช้งานโดยไม่เปิดเผยอะไร (FR-496) เอกสารที่เกี่ยวข้อง → 6 · A-111 R-ONECLAIM · NFR-198/NFR-199 · อ่านด้วย V-20 ขา (ง) และ (ฌ)