SPEC-ERD-CFC Rev 0.8.2 · 2026-08-03

Cane Agency · Specification · Perspective documentสถาบันอ้อย · เอกสารข้อกำหนด · เอกสารรายมุมมอง

Data Model — Cane Farmer Perspectivemodel ข้อมูล — มุมมองลูกไร่อ้อย

Documentเอกสาร
SPEC-ERD-CFC
Versionversion (เวอร์ชัน)
0.8.2 · Draftฉบับร่าง
Updatedปรับปรุงล่าสุด
2026-08-03
Parentเอกสารแม่
SPEC-ERD
Perspectiveมุมมอง
Cane farmer (ลูกไร่อ้อย)ลูกไร่อ้อย
Siblingsเอกสารพี่น้อง
SPEC-DDD-CFC · SPEC-PWF-CFC

1. Purpose1. วัตถุประสงค์

This document reads the platform data model from the cane farmer's side: the entities this perspective owns (its documents are the deep reference), the entities it shares (views whose rules are set by the owning perspective), and the contracts it holds with the other three groups. Every definition here mirrors SPEC-ERD and graph/spec-graph.json — a perspective document adds actor-relevant reading, never divergent attributes.

เอกสารนี้อ่าน model ข้อมูลของ platform จากฝั่งลูกไร่: entity ที่มุมมองนี้เป็นเจ้าของ (เอกสารของมุมมองนี้คือเอกสารอ้างอิงเชิงลึก), entity ที่ใช้ร่วม (มุมมองที่กฎถูกกำหนดโดยมุมมองเจ้าของ) และสัญญาที่มีต่ออีกสามกลุ่ม ทุกนิยามสะท้อน SPEC-ERD และ graph/spec-graph.json — เอกสารรายมุมมองเพิ่มการตีความที่เกี่ยวกับผู้ใช้ ไม่สร้างแอตทริบิวต์ที่แตกต่าง

2. Entity map2. แผนที่ entity

Relationความเกี่ยวข้องEntitiesEntity
Ownsเป็นเจ้าของField · Crop · CaneVariety · SoilGroup · FarmActivity · WeatherObservation · YieldEstimate
Sharesใช้ร่วมFarmer · CropTransfer · Quota · Delivery · WeighTicket · QualityTest · CreditLine · CreditItem · Repayment · PaymentItem · Truck · CanePriceAnnouncement · StrategicAgreement · PremiumAccrual · PremiumRelease · OnwardPremiumSettlement v8.0 · LedgerAccount · JournalEntry · ChartTemplate · Invoice · Receipt · PaymentVoucher · CashAccount · BankTransaction · Reconciliation · FiscalPeriod · FinancialStatement v9.0 · BooksProfile v12.0
Contextsบริบทland_crop_registry · farm_agronomy · strategic_pricing v8.0 · books · receivables · cash_management v9.0
WorkflowsWorkflowWF-01 · WF-08 · WF-09 · WF-31 · WF-34 v8.0 · WF-36 · WF-37 · WF-38 · WF-39 · WF-40 · WF-41 v9.0

3. Entity relationship diagram3. แผนภาพความสัมพันธ์ entity

Scoped view of the platform model from this perspective, rendered from the graph (entities · relationships · dataModeling, v0.4.0). Solid boxes are entities documented at full depth in this family — bold = primary key, gold = foreign key. Dashed boxes are shared entities; the label names their home document. Cardinalities read at each line end.

มุมมองเฉพาะด้านของ model ทั้ง platform render จาก graph (entities · relationships · dataModeling, v0.4.0) กล่องเส้นทึบคือ entity ที่บันทึกเชิงลึกในเอกสารตระกูลนี้ — ตัวหนา = primary key, สีทอง = foreign key กล่องเส้นประคือ entity ที่ใช้ร่วม โดยป้ายระบุเอกสาร home; อ่าน cardinality ที่ปลายเส้นแต่ละด้าน

0..*10..*10..*10..*10..*0..111..*10..*10..*10..*10..*0..10..*10..* Farmerชาวไร่ · CFQFieldแปลงอ้อยfield_id PKfarmer_id FKarea_raigeo_boundarysoil_group_id? FKirrigationSoilGroupกลุ่มชุดดินsoil_group_id PKldd_group_notexturedrainagecane_suitabilitynoteCropอ้อยรายฤดูcrop_id PKfield_id FKseason_id FKowner_farmer_id FKcrop_classvariety_id FKplanted_at?previous_crop_id? FKexpected_yield_tstatusWeatherObservationข้อมูลอากาศobs_id PKfield_id? FKzone_code?observed_onsourcerain_mm?temp_min_c?temp_max_c?note?CaneVarietyพันธุ์อ้อยvariety_id PKcodename_thoriginmaturity_classratoon_abilityrecommended_regionsdisease_notesstatusFarmActivityกิจกรรมแปลงactivity_id PKcrop_id FKactivity_typeperformed_onmaterial?qty?unit?credit_item_id? FKwork_order_id? FK+4 more…YieldEstimateประมาณการผลผลิตestimate_id PKcrop_id FKmethodestimated_testimated_ccs?basis_snapshotestimated_atSeasonฤดูหีบ · FEDCropTransferการโอนสิทธิ์อ้อย · CFQDeliveryการส่งมอบ · MILL
Fig. 1 — Field carries land facts only (PROP-001); a Crop is field × season × owner, pinned to a variety, accumulating activities, yield estimates and weather context; deliveries and ownership transfers reference the crop.ภาพที่ 1 — Field เก็บข้อเท็จจริงที่ดินเท่านั้น (PROP-001); Crop คือ แปลง × ฤดู × เจ้าของ ตรึงพันธุ์อ้อย สะสมกิจกรรม การประมาณผลผลิต และบริบทอากาศ; การส่งมอบและการโอนกรรมสิทธิ์อ้างอิง crop
10..10..*11..*10..*10..*0..10..10..* CreditLineวงเงินเกี๊ยว · CFQCreditItemรายการสินเชื่อ/ปัจจัยการผลิต · CFQRepaymentการชำระคืน · CFQDeliveryการส่งมอบ · MILLPaymentItemรายการจ่ายต่อการส่งมอบ · MILLOnwardPremiumSettlementการส่งต่อค่าอ้อยกลยุทธ์สู่ลูกไร่ · CFQStrategicAgreementข้อตกลงค่าอ้อยกลยุทธ์ · MILL
Fig. 2 — Shared financial entities the cane farmer reads — เงินเกี๊ยว credit items and repayments, the settlement PaymentItem behind each delivery, and the onward relay of the confidential strategic premium.ภาพที่ 2 — Entity การเงินที่ลูกไร่อ่าน — รายการเงินเกี๊ยวและการชำระ, PaymentItem ของการปิดงวดเบื้องหลังการส่งมอบแต่ละครั้ง และการส่งต่อพรีเมียมกลยุทธ์ (ความลับ)

4. Owned entities — the farmer's reading4. Entity ที่เป็นเจ้าของ — การอ่านของลูกไร่

EntityEntityWhat it means to the farmerความหมายต่อลูกไร่Rules that biteกฎที่มีผล
Field แปลงอ้อยMy land — area (ไร่), GPS boundary, LDD soil group, water source.ที่ดินของฉัน — พื้นที่ (ไร่) ขอบเขต GPS กลุ่มชุดดิน แหล่งน้ำLand facts only; the cane itself lives on Crop. Landholding optional (a buyer may hold none).ข้อมูลที่ดินเท่านั้น; อ้อยอยู่ที่ Crop การถือครองไม่บังคับ (ผู้ซื้ออ้อยอาจไม่มีแปลง)
Crop อ้อยรายฤดู"My cane this season" — plant/ratoon class, variety (from the catalogue), expected yield, status."อ้อยของฉันฤดูนี้" — รุ่นปลูก/ตอ พันธุ์ (จาก catalog (แคตตาล็อก)) ประมาณการผลผลิต สถานะOne per field per season; owner changes only via CropTransfer; deliveries book against the crop, not the field.หนึ่งรายการต่อแปลงต่อฤดู; เจ้าของเปลี่ยนผ่าน CropTransfer เท่านั้น; การส่งมอบจองอิงอ้อย ไม่ใช่แปลง
CaneVariety · SoilGroupReference pickers — ขอนแก่น 3, LK92-11, อู่ทอง 12–17 …; LDD soil groups 1–62.ตัวเลือกอ้างอิง — ขอนแก่น 3, LK92-11, อู่ทอง 12–17 …; กลุ่มชุดดิน 1–62Read-only catalogues; unknown variety allowed during migration.catalog อ่านอย่างเดียว; ใช้พันธุ์ unknown ช่วงโอนย้ายได้
FarmActivity กิจกรรมแปลงMy field diary — land prep, planting, fertilizing, irrigation … recorded per crop, offline-capable.สมุดบันทึกไร่ — เตรียมดิน ปลูก ใส่ปุ๋ย ให้น้ำ … บันทึกรายอ้อย ทำงานออฟไลน์ได้Append-only. Linking credit_item_id makes that entry visible to the lender; everything else is mine unless I share it.ต่อท้ายเท่านั้น การเชื่อม credit_item_id ทำให้ผู้ให้กู้เห็นรายการนั้น; นอกนั้นเป็นของฉันเว้นแต่เลือกแชร์
WeatherObservationRain and temperature per field (my manual entries) or per zone (feed).ฝนและอุณหภูมิรายแปลง (บันทึกเอง) หรือรายเขต (ฟีด)Exactly one of field / zone per record.ต่อระเบียนมี field หรือ zone อย่างใดอย่างหนึ่ง
YieldEstimateWhat this crop should make — declared or model-assisted; drives my credit size and quota plan.อ้อยนี้ควรได้เท่าไร — แจ้งเองหรือ model ช่วย; กำหนดวงเงินและแผนโควตาของฉันBasis snapshot is frozen; latest mirrors into Crop.expected_yield_t.ตรึงฐานข้อมูล; ค่าล่าสุดสะท้อนเข้า Crop.expected_yield_t

5. Shared entities — the view from this side5. Entity ที่ใช้ร่วม — มุมมองจากฝั่งนี้

EntityEntityOwnerเจ้าของWhat the farmer reads / writesลูกไร่อ่าน / เขียนอะไร
Farmer · CropTransfer · Quota · CreditLine/Item · RepaymentCFQReads own record, network standing, quota drawdown and credit balance; writes credit requests and confirms transfers/sales (two-side). A virtual farmer converts keeping farmer_id.อ่านระเบียนตน สถานะเครือข่าย การใช้โควตา และยอดสินเชื่อ; เขียนคำขอสินเชื่อและยืนยันการโอน/ขาย (สองฝ่าย) ลูกไร่ virtual แปลงเป็นบัญชีจริงโดยคง farmer_id
Delivery · WeighTicket · QualityTest · TruckMILLWrites the booking (crop, truck, cane type, harvest method); reads ticket and per-truck CCS result; scans the QR to link the paper ticket.เขียนการจอง (อ้อย รถ ประเภทอ้อย วิธีเก็บเกี่ยว); อ่านบัตรชั่งและผล CCS รายคันรถ; สแกน QR เชื่อมบัตรกระดาษ
PaymentItemMILLReads the statement: base × net weight + CCS premium ± cane-type adjustment − deductions (credit offsets line by line).อ่านใบแจ้งยอด: ฐาน × น้ำหนักสุทธิ + พรีเมียม CCS ± ส่วนต่างประเภทอ้อย − การหัก (หักหนี้ทีละบรรทัด)
CanePriceAnnouncementGOVReads the season's ขั้นต้น/ขั้นสุดท้าย price and the ฿/CCS increment behind the premium.อ่านราคาขั้นต้น/ขั้นสุดท้ายของฤดูและอัตราบาท/CCS เบื้องหลังพรีเมียม

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

Normative physical model for the 7 entities homed in this document, rendered from the graph's dataModeling block. Types derive from typeConventions (first rule wins): money = bigint satang · weights = integer kg · tonnage = numeric(12,3) · timestamps = timestamptz UTC · ids = uuid v7. Every FK is indexed by convention (ON DELETE RESTRICT); listed indexes are additional. Enum value sets live in the graph's entity and state-machine notes.

Model เชิงกายภาพที่เป็นบรรทัดฐานของ entity ทั้ง 7 รายการที่ home อยู่ในเอกสารนี้ render จาก block dataModeling ใน graph ชนิดข้อมูลอนุมานจาก typeConventions (กติกาแรกที่เข้าเป็นผล): เงิน = bigint สตางค์ · น้ำหนัก = integer กก. · ตัน = numeric(12,3) · เวลา = timestamptz UTC · id = uuid v7 ทุก FK มี index ตามข้อตกลง (ON DELETE RESTRICT); index ที่ระบุคือส่วนเพิ่ม ชุดค่า enum อยู่ในหมายเหตุ entity และ state machine ของ graph

Field แปลงอ้อย mutable operational

table field  ·  aggregate Field  ·  code FLD-######  ·  index (farmer_id) · (geo_boundary (gist))

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
field_iduuid—uuid_v7()PK
farmer_iduuid——FK → farmer
area_rainumeric(10,2)——
geo_boundaryjsonb (GeoJSON polygon)——
soil_group_iduuid✓—FK → soil_group
irrigationtext (enum)——

Crop อ้อยรายฤดู mutable operational

table crop  ·  aggregate Crop  ·  code CRP-25##-######  ·  unique (field_id,season_id)  ·  index (owner_farmer_id,season_id) · (status)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
crop_iduuid—uuid_v7()PK
field_iduuid——FK → field
season_iduuid——FK → season
owner_farmer_iduuid——FK → farmer
crop_classtext (enum)——
variety_iduuid——FK → cane_variety
planted_attimestamptz✓—
previous_crop_iduuid✓—FK → crop
expected_yield_tnumeric(12,3) (t)——
statustext (enum)——

CaneVariety พันธุ์อ้อย reference public

table cane_variety  ·  aggregate CaneVariety  ·  code VAR-####  ·  unique (code)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
variety_iduuid—uuid_v7()PK
codetext——
name_thtext——
origintext——
maturity_classtext (enum)——
ratoon_abilitytext (enum)——
recommended_regionsjsonb——
disease_notestext——
statustext (enum)——

SoilGroup กลุ่มชุดดิน reference public

table soil_group  ·  aggregate SoilGroup  ·  code SOIL-##  ·  unique (ldd_group_no)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
soil_group_iduuid—uuid_v7()PK
ldd_group_notext——
texturetext——
drainagetext (enum)——
cane_suitabilitytext (enum)——
notetext——

FarmActivity กิจกรรมแปลง append_only operational

table farm_activity  ·  aggregate Crop  ·  code ACT-########  ·  index (crop_id,performed_on) · (credit_item_id) · (work_order_id) · (performed_by_contractor_id)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
activity_iduuid—uuid_v7()PK
crop_iduuid——FK → crop
activity_typetext (enum)——
performed_ondate——
materialtext✓—
qtynumeric(10,2)✓—
unittext✓—
credit_item_iduuid✓—FK → credit_item
work_order_iduuid✓—FK → work_order
performed_by_contractor_iduuid✓—FK → contractor
cost_amtbigint (satang)✓—
recorded_byuuid——FK → membership
sourcetext (enum)——

WeatherObservation ข้อมูลอากาศ append_only public

table weather_observation  ·  aggregate WeatherObservation  ·  code WX-########  ·  index (field_id,observed_on) · (zone_code,observed_on)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
obs_iduuid—uuid_v7()PK
field_iduuid✓—FK → field
zone_codetext✓—
observed_ondate——
sourcetext (enum)——
rain_mmnumeric(6,1)✓—
temp_min_cnumeric(4,1)✓—
temp_max_cnumeric(4,1)✓—
notetext✓—

YieldEstimate ประมาณการผลผลิต append_only operational

table yield_estimate  ·  aggregate Crop  ·  code YE-########  ·  index (crop_id,estimated_at)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
estimate_iduuid—uuid_v7()PK
crop_iduuid——FK → crop
methodtext (enum)——
estimated_tnumeric(12,3) (t)——
estimated_ccsnumeric(4,2)✓—
basis_snapshotjsonb——
estimated_attimestamptz——

CropCycle รอบปลูก mutable operational

table crop_cycle  ·  aggregate CropCycle  ·  code CYC-########  ·  unique (field_id,established_season_id)  ·  index (owner_farmer_id,status) · (field_id,status) · (established_season_id)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
cycle_iduuid—uuid_v7()PK
field_iduuid——FK → field
owner_farmer_iduuid——FK → farmer
established_season_iduuid——FK → season
plant_crop_iduuid——FK → crop
planned_ratoonssmallint——
expected_cycle_tnumeric(12,3)——
amort_basistext (enum)——
ratoon_index_at_joinsmallint✓—
statustext (enum)——
closed_season_iduuid✓—FK → season
close_reasontext (enum)✓—

LandRight เอกสารสิทธิ์ immutable_after_state personal

table land_right  ·  aggregate LandRight  ·  code LR-########  ·  unique (right_type,deed_no,province)  ·  index (holder_tenant_id) · (province,amphor,tumboon) · (status)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
right_iduuid—uuid_v7()PK
right_typetext (enum)——
deed_notext——
ravangtext✓—
survey_pagetext✓—
book_notext✓—
page_notext✓—
land_notext✓—
tumbooninteger✓—
amphorinteger✓—
provincesmallint——
area_raiinteger——
area_ngansmallint——
area_wanumeric(6,1)——
area_sqmnumeric(12,2)——
issued_ondate✓—
holder_tenant_iduuid✓—FK → tenant
geometryjsonb (GeoJSON polygon, projected CRS)✓—
document_iduuid——FK → document
statustext (enum)——

FieldRight สิทธิของแปลง append_only personal

table field_right  ·  aggregate LandRight  ·  code FRG-########  ·  unique (right_id,field_id,from_date)  ·  index (field_id) · (right_id)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
field_right_iduuid—uuid_v7()PK
right_iduuid——FK → land_right
field_iduuid——FK → field
share_pctnumeric(5,2)✓—
from_datedate——
to_datedate✓—

TenureRecord สถานะถือครองรายแปลง immutable_after_state personal

table tenure_record  ·  aggregate TenureRecord  ·  code TEN-########  ·  unique (field_id,farmer_id,valid_from)  ·  index (farmer_id,status) · (field_id,valid_from) · (status)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
tenure_iduuid—uuid_v7()PK
field_iduuid——FK → field
farmer_iduuid——FK → farmer
basistext (enum)——
right_iduuid✓—FK → land_right
lease_iduuid✓—FK → lease
valid_fromtext——
valid_totext✓—
evidencetext (enum)——
verified_byuuid✓—FK → membership
statustext (enum)——

Lease สัญญาเช่า immutable_after_state personal

table lease  ·  aggregate Lease  ·  code LSE-########  ·  index (lessee_farmer_id,status) · (landlord_tenant_id) · (end_on)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
lease_iduuid—uuid_v7()PK
landlord_tenant_iduuid——FK → tenant
lessee_farmer_iduuid——FK → farmer
document_iduuid✓—FK → document
start_ondate——
end_ondate——
rent_amountnumeric(14,2)——
rent_basistext (enum)——
renewaltext (enum)——
statustext (enum)——

Document เอกสาร immutable_after_state personal

table document  ·  aggregate Document  ·  code DOC-########  ·  index (owner_tenant_id,document_type) · (verification_state) · (retention_until) · (capture_state)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
document_iduuid—uuid_v7()PK
document_typetext (enum)——
nametext——
owner_tenant_iduuid——FK → tenant
issued_ondate✓—
expires_ondate✓—
reference_notext✓—
verification_statetext (enum)——
uploaded_byuuid——FK → membership
retention_classtext (enum)——
capture_statetext (enum)——
sourcetext (enum)——
ocr_payloadjsonb (unconfirmed — never posts on its own)✓—
retention_untiltext——

DocumentPage หน้าเอกสาร append_only personal

table document_page  ·  aggregate Document  ·  code DPG-########  ·  unique (document_id,page_no)  ·  index (document_id)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
page_iduuid—uuid_v7()PK
document_iduuid——FK → document
page_nosmallint——
image_reftext (object-store key)——
captured_ondate——
captured_byuuid——FK → membership
ocr_texttext✓—

FieldBoundary ขอบเขตแปลง append_only operational

table field_boundary  ·  aggregate FieldBoundary  ·  code FBD-########  ·  index (field_id,effective_from) · (trace_quality)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
boundary_iduuid—uuid_v7()PK
field_iduuid——FK → field
geometryjsonb (GeoJSON polygon, projected CRS)——
area_rai_calcnumeric(10,2)——
methodtext (enum)——
instrumenttext✓—
accuracy_mnumeric(6,2)——
surveyed_byuuid——FK → tenant
surveyor_kindtext (enum)——
independentboolean——
trace_qualitytext (enum)——
confidencenumeric(5,2)——
effective_fromtext——
supersedes_iduuid✓—FK → field_boundary

LandHistory ประวัติที่ดิน append_only operational

table land_history  ·  aggregate LandHistory  ·  code LHS-########  ·  index (field_id,from_season)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
history_iduuid—uuid_v7()PK
field_iduuid——FK → field
from_seasonuuid——FK → season
to_seasonuuid✓—FK → season
usetext (enum)——
eventtext (enum)✓—
yield_t_per_rainumeric(8,3)✓—
notetext✓—

FieldAlias เอเลียสของแปลง immutable_after_state confidential_wall

table field_alias  ·  aggregate FieldAlias  ·  code FAL-########  ·  unique (field_id,counterparty_tenant_id)  ·  index (counterparty_tenant_id,alias_code)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
alias_iduuid—uuid_v7()PK
field_iduuid——FK → field
counterparty_tenant_iduuid——FK → tenant
alias_codetext (per-counterparty handle — never the field id)——
issued_attimestamptz——
frozen_attimestamptz✓—

FieldSurvey การสำรวจแปลง append_only operational

table field_survey  ·  aggregate FieldSurvey  ·  code FSV-########  ·  index (field_id,surveyed_on) · (season_id)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
survey_iduuid—uuid_v7()PK
field_iduuid——FK → field
season_iduuid✓—FK → season
surveyed_ondate——
surveyed_byuuid——FK → membership
purposetext (enum)——
evidencejsonb——
findings_reftext✓—

FieldWaterSource แหล่งน้ำของแปลง append_only operational

table field_water_source  ·  aggregate FieldWaterSource  ·  code FWS-########  ·  index (field_id,water_source_kind)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
source_iduuid—uuid_v7()PK
field_iduuid——FK → field
water_source_kindtext (enum)——
surveyed_ondate——
surveyed_byuuid——FK → membership
months_availablesmallint——
reliabilitytext (enum)——

IrrigationAsset สินทรัพย์แหล่งน้ำ mutable confidential_wall

table irrigation_asset  ·  aggregate IrrigationAsset  ·  code IRA-########  ·  index (farmer_id,kind) · (field_id) · (centre_id)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
asset_iduuid—uuid_v7()PK
field_iduuid✓—FK → field
farmer_iduuid——FK → farmer
kindtext (enum)——
capacity_m3numeric(12,2)✓—
pump_kwnumeric(8,2)✓—
months_availablesmallint——
sharedboolean——
installed_ondate✓—
centre_iduuid——FK → cost_centre
acquisition_costnumeric(14,2)——
funded_amountnumeric(14,2)——
funding_source_iduuid✓—FK → tenant
useful_life_seasonssmallint——
depreciation_basistext (enum)——
served_rainumeric(10,2)——

BufferZone แนวป้องกัน mutable operational

table buffer_zone  ·  aggregate BufferZone  ·  code BFZ-########  ·  index (field_id)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
zone_iduuid—uuid_v7()PK
field_iduuid——FK → field
width_mnumeric(6,2)——
is_naturalboolean——
descriptiontext✓—

SoilAnalysis วิเคราะห์ดิน immutable_after_state operational

table soil_analysis  ·  aggregate SoilAnalysis  ·  code SAN-########  ·  unique (field_id,sampling_no)  ·  index (farmer_id,sampled_on) · (status) · (field_id,sampled_on)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
analysis_iduuid—uuid_v7()PK
field_iduuid——FK → field
farmer_iduuid——FK → farmer
sampling_notext——
sampled_ondate——
analysed_ondate✓—
sample_pointjsonb (GeoJSON point)——
sample_weight_ginteger✓—
sampled_byuuid——FK → membership
document_iduuid✓—FK → document
lab_reftext✓—
statustext (enum)——
remarktext✓—

SoilAnalysisResult ผลวิเคราะห์ดิน append_only operational

table soil_analysis_result  ·  aggregate SoilAnalysis  ·  code SAR-########  ·  unique (analysis_id,title_id)  ·  index (analysis_id)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
result_iduuid—uuid_v7()PK
analysis_iduuid——FK → soil_analysis
title_iduuid——FK → soil_analysis_title
value_numnumeric(12,4)✓—
unittext✓—
unit_scale_step_iduuid✓—FK → unit_scale
text_valuetext✓—
remarktext✓—

Planting การปลูก append_only operational

table planting  ·  aggregate Planting  ·  code PLN-########  ·  index (crop_id,planted_on) · (variety_id)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
planting_iduuid—uuid_v7()PK
crop_iduuid——FK → crop
planting_kindtext (enum)——
planted_ondate——
area_rainumeric(10,2)——
modetext (enum)——
variety_iduuid——FK → cane_variety
seed_qtynumeric(12,3)——
seed_qty_unittext (enum)——
costnumeric(14,2)✓—
notetext✓—

SoilAdjustment ประวัติการปรับปรุงดิน append_only operational

table soil_adjustment  ·  aggregate SoilAdjustment  ·  code SAJ-########  ·  index (field_id,performed_on) · (crop_id,performed_on)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
adjustment_iduuid—uuid_v7()PK
crop_iduuid✓—FK → crop
field_iduuid✓—FK → field
activitytext (enum)——
equipment_typetext (enum)✓—
performed_ondate——
amountnumeric(12,3)✓—
unittext (enum)✓—
costnumeric(14,2)✓—
descriptiontext✓—
work_order_iduuid✓—FK → work_order

CropOutcome ผลผลิตจริงรายฤดู immutable_after_state operational

table crop_outcome  ·  aggregate CropOutcome  ·  code COU-########  ·  unique (crop_id,season_id)  ·  index (season_id) · (crop_id)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
outcome_iduuid—uuid_v7()PK
crop_iduuid——FK → crop
season_iduuid——FK → season
harvested_area_rainumeric(10,2)——
tonnage_tnumeric(12,3) (t)——
t_per_rainumeric(8,3)——
avg_ccsnumeric(5,2)✓—
sourcetext (enum)——
closed_ondate——

FieldCapabilityProfile ศักยภาพของแปลง append_only operational

table field_capability_profile  ·  aggregate FieldCapabilityProfile  ·  code FCP-########  ·  unique (field_id,method_version,computed_on)  ·  index (field_id,computed_on) · (capability_band)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
profile_iduuid—uuid_v7()PK
field_iduuid——FK → field
computed_ondate——
method_versiontext——
capability_bandtext (enum)——
machine_classtext (enum)——
factor_scoresjsonb——
inputs_snapshotjsonb——
confidencenumeric(5,2)——

CropValueEstimate ประมาณการมูลค่าอ้อย append_only confidential_wall

table crop_value_estimate  ·  aggregate CropValueEstimate  ·  code CVE-########  ·  index (crop_id,as_of) · (expires_on)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
value_iduuid—uuid_v7()PK
crop_iduuid——FK → crop
estimate_iduuid——FK → yield_estimate
t_expectednumeric(12,3)——
ccs_expectednumeric(5,2)——
price_basistext (enum)——
price_reftext✓—
gross_valuenumeric(14,2)——
deduction_estimatenumeric(14,2)——
net_to_growernumeric(14,2)——
as_oftext——
expires_ondate——
basis_snapshotjsonb——

FieldMillDistance ระยะแปลง–โรงงาน append_only operational

table field_mill_distance  ·  aggregate FieldMillDistance  ·  code FMD-########  ·  unique (field_id,mill_id,method)  ·  index (mill_id,distance_km) · (valid_until)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
distance_iduuid—uuid_v7()PK
field_iduuid——FK → field
mill_iduuid——FK → mill
methodtext (enum)——
routing_sourcetext (enum)✓—
distance_kmnumeric(8,2)——
drive_time_mininteger✓—
computed_ondate——
valid_untiltext✓—

RouteAnalysis การวิเคราะห์เส้นทาง append_only operational

table route_analysis  ·  aggregate RouteAnalysis  ·  code RTA-########  ·  index (requested_by,requested_at) · (field_id)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
request_iduuid—uuid_v7()PK
field_iduuid——FK → field
requested_byuuid——FK → tenant
mill_idsjsonb (uuid[])——
ranked_resultsjsonb——
credits_debitedinteger——
requested_attimestamptz——
degradedboolean——

RoutingCreditLedger บัญชีเครดิตเส้นทาง append_only operational

table routing_credit_ledger  ·  aggregate RouteAnalysis  ·  code RCL-########  ·  index (tenant_id,occurred_on)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
entry_iduuid—uuid_v7()PK
tenant_iduuid——FK → tenant
entry_kindtext (enum)——
qtyinteger——
balance_afterinteger——
source_reftext✓—
occurred_ondate——

SoilSeries ชุดดิน reference public

table soil_series  ·  aggregate SoilSeries  ·  code SSR-####  ·  unique (code)  ·  index (soil_group_id) · (status)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
series_iduuid—uuid_v7()PK
codetext——
name_thtext——
name_entext——
soil_group_iduuid——FK → soil_group
texture_defaulttext✓—
descriptiontext✓—
statustext (enum)——

UnitScaleType ชนิดชั้นการวัด reference public

table unit_scale_type  ·  aggregate UnitScaleType  ·  code UST-###  ·  unique (code,version)  ·  index (department)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
scale_type_iduuid—uuid_v7()PK
codetext——
name_thtext——
name_entext——
departmenttext (enum)——
versionsmallint——

UnitScale ขั้นของชั้นการวัด reference public

table unit_scale  ·  aggregate UnitScaleType  ·  code USC-####  ·  unique (scale_type_id,rank,version)  ·  index (scale_type_id)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
step_iduuid—uuid_v7()PK
scale_type_iduuid——FK → unit_scale_type
ranksmallint——
label_thtext——
label_entext——
value_fromnumeric(12,4)✓—
value_tonumeric(12,4)✓—
unittext✓—
versionsmallint——

SoilAnalysisTitle หัวข้อการวิเคราะห์ดิน reference public

table soil_analysis_title  ·  aggregate SoilAnalysisTitle  ·  code SAT-###  ·  unique (code,version)  ·  index (group)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
title_iduuid—uuid_v7()PK
codetext——
name_thtext——
name_entext——
grouptext (enum)——
unittext✓—
scale_type_iduuid✓—FK → unit_scale_type
versionsmallint——

ProductivityPartnership ความร่วมมือเพิ่มผลผลิต immutable_after_state confidential_wall

table productivity_partnership  ·  aggregate ProductivityPartnership  ·  code PPS-########  ·  index (recipient_tenant_id,season_id) · (provider_tenant_id,status)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
partnership_iduuid—uuid_v7()PK
provider_tenant_iduuid——FK → tenant
recipient_tenant_iduuid——FK → tenant
season_iduuid——FK → season
field_idsjsonb (uuid[])✓—
statustext (enum)——
proposed_bytext——
proposed_attimestamptz——
accepted_attimestamptz✓—
closed_attimestamptz✓—
notetext✓—

PartnershipLine รายการความร่วมมือ immutable_after_state confidential_wall

table partnership_line  ·  aggregate ProductivityPartnership  ·  code PPL-########  ·  index (partnership_id) · (credit_line_id) · (centre_id)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
line_iduuid—uuid_v7()PK
partnership_iduuid——FK → productivity_partnership
line_kindtext (enum)——
provider_tenant_iduuid——FK → tenant
descriptiontext——
qtynumeric(12,3)✓—
unittext (enum)✓—
price_basistext (enum)——
amountnumeric(14,2)✓—
settlement_routetext (enum)——
credit_line_iduuid✓—FK → credit_line
statustext (enum)——
agreed_attimestamptz✓—
centre_iduuid✓—FK → cost_centre
cost_class_hinttext (enum)✓—

IdentityDisclosure การเปิดเผยตัวตน append_only consent_gated

table identity_disclosure  ·  aggregate IdentityDisclosure  ·  code IDD-########  ·  index (field_id,requested_at) · (requester_tenant_id,outcome)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
disclosure_iduuid—uuid_v7()PK
field_iduuid——FK → field
requester_tenant_iduuid——FK → tenant
relayed_by_tenant_iduuid——FK → tenant
purposetext (enum)——
consent_iduuid✓—FK → consent_grant
requested_attimestamptz——
decided_attimestamptz✓—
outcometext (enum)——
expires_attimestamptz✓—
revoked_attimestamptz✓—
Applied — PROP-054 · spec v0.38.0 — the authorship pair on the capture familyapply แล้ว — PROP-054 · spec v0.38.0 — คู่ฟิลด์ผู้บันทึกบนตระกูลการบันทึก

Records the farmer's account produces now name their author and the mode they were captured in. captured_by_membership_id uuid nullable, FK → membership, and capture_mode text (enum) nullable — self | assisted | delegated — are added to planting · soil_adjustment · crop_outcome · yield_estimate · document (and, in SPEC-ERD-MILL, to the capture-sourced journal_entry lines). field_boundary takes only capture_mode, because surveyed_by already carries the acting membership (FR-250). Both columns are write-once at insert and never updated — on append-only tables that follows from the mutability class, and on document (immutable_after_state) it is an explicit rule: a correction is a new row or a supersede carrying its own stamp, never an edit of the stamp (FR-339, A-71). No new entity, no new key, no index: the pair is read by tenant, which every one of these tables already indexes. Server-side stripping keeps both fields out of every external read path (NFR-124).

ระเบียนที่บัญชีของชาวไร่ผลิตขึ้นจะระบุผู้บันทึกและโหมดการบันทึกแล้ว: captured_by_membership_id uuid ว่างได้ FK → membership และ capture_mode text (enum) ว่างได้ — self | assisted | delegated — เพิ่มบน planting · soil_adjustment · crop_outcome · yield_estimate · document (และบรรทัด journal_entry ที่มาจากการบันทึกของชาวไร่ ใน SPEC-ERD-MILL) ส่วน field_boundary เพิ่มเฉพาะ capture_mode เพราะ surveyed_by เก็บ membership ผู้ลงมืออยู่แล้ว (FR-250) ทั้งสองคอลัมน์เขียนครั้งเดียวตอน insert และไม่ update การแก้คือแถวใหม่หรือการ supersede ที่มีตราของตัวเอง ไม่ใช่การแก้ตรา (FR-339, A-71) ไม่มี entity ใหม่ ไม่มี key ใหม่ ไม่มี index ใหม่ และตัดทั้งสองฟิลด์ฝั่ง server ทุกเส้นทางอ่านภายนอก (NFR-124)

7. Keys, indexes & mutability7. Key, index และ mutability

One row per entity in this perspective. Mutability: mutable · immutable_after_state (frozen once a terminal/approved state is reached) · append_only (corrections supersede or reverse, never edit) · reference (catalogue). PDPA class: personal · consent_gated · confidential_wall · operational · public. Entities homed in a sibling document link to their full profile.

หนึ่งแถวต่อ entity ในมุมมองนี้ Mutability: mutable · immutable_after_state (ตรึงเมื่อถึงสถานะอนุมัติ/สุดท้าย) · append_only (การแก้คือออกฉบับแทนหรือกลับรายการ ไม่แก้ของเดิม) · reference (บัญชีอ้างอิง) ชั้น PDPA: personal · consent_gated · confidential_wall · operational · public Entity ที่ home อยู่เอกสารพี่น้อง link ไป profile ฉบับเต็ม

EntityTableตารางPKUniqueKey indexesIndex หลักMutabilityPDPAProfile
Fieldfieldfield_id—(farmer_id) (geo_boundary (gist))mutableoperationalSection 6ข้อ 6
Cropcropcrop_id(field_id,season_id)(owner_farmer_id,season_id) (status)mutableoperationalSection 6ข้อ 6
CaneVarietycane_varietyvariety_id(code)—referencepublicSection 6ข้อ 6
SoilGroupsoil_groupsoil_group_id(ldd_group_no)—referencepublicSection 6ข้อ 6
FarmActivityfarm_activityactivity_id—(crop_id,performed_on) (credit_item_id) (work_order_id) (performed_by_contractor_id)append_onlyoperationalSection 6ข้อ 6
WeatherObservationweather_observationobs_id—(field_id,observed_on) (zone_code,observed_on)append_onlypublicSection 6ข้อ 6
YieldEstimateyield_estimateestimate_id—(crop_id,estimated_at)append_onlyoperationalSection 6ข้อ 6
CropCyclecrop_cyclecycle_id(field_id,established_season_id)(owner_farmer_id,status) (field_id,status) (established_season_id)mutableoperationalSection 6ข้อ 6
LandRightland_rightright_id(right_type,deed_no,province)(holder_tenant_id) (province,amphor,tumboon) (status)immutable_after_statepersonalSection 6ข้อ 6
FieldRightfield_rightfield_right_id(right_id,field_id,from_date)(field_id) (right_id)append_onlypersonalSection 6ข้อ 6
TenureRecordtenure_recordtenure_id(field_id,farmer_id,valid_from)(farmer_id,status) (field_id,valid_from) (status)immutable_after_statepersonalSection 6ข้อ 6
Leaseleaselease_id—(lessee_farmer_id,status) (landlord_tenant_id) (end_on)immutable_after_statepersonalSection 6ข้อ 6
Documentdocumentdocument_id—(owner_tenant_id,document_type) (verification_state) (retention_until) (capture_state)immutable_after_statepersonalSection 6ข้อ 6
DocumentPagedocument_pagepage_id(document_id,page_no)(document_id)append_onlypersonalSection 6ข้อ 6
FieldBoundaryfield_boundaryboundary_id—(field_id,effective_from) (trace_quality)append_onlyoperationalSection 6ข้อ 6
LandHistoryland_historyhistory_id—(field_id,from_season)append_onlyoperationalSection 6ข้อ 6
FieldAliasfield_aliasalias_id(field_id,counterparty_tenant_id)(counterparty_tenant_id,alias_code)immutable_after_stateconfidential_wallSection 6ข้อ 6
FieldSurveyfield_surveysurvey_id—(field_id,surveyed_on) (season_id)append_onlyoperationalSection 6ข้อ 6
FieldWaterSourcefield_water_sourcesource_id—(field_id,water_source_kind)append_onlyoperationalSection 6ข้อ 6
IrrigationAssetirrigation_assetasset_id—(farmer_id,kind) (field_id) (centre_id)mutableconfidential_wallSection 6ข้อ 6
BufferZonebuffer_zonezone_id—(field_id)mutableoperationalSection 6ข้อ 6
SoilAnalysissoil_analysisanalysis_id(field_id,sampling_no)(farmer_id,sampled_on) (status) (field_id,sampled_on)immutable_after_stateoperationalSection 6ข้อ 6
SoilAnalysisResultsoil_analysis_resultresult_id(analysis_id,title_id)(analysis_id)append_onlyoperationalSection 6ข้อ 6
Plantingplantingplanting_id—(crop_id,planted_on) (variety_id)append_onlyoperationalSection 6ข้อ 6
SoilAdjustmentsoil_adjustmentadjustment_id—(field_id,performed_on) (crop_id,performed_on)append_onlyoperationalSection 6ข้อ 6
CropOutcomecrop_outcomeoutcome_id(crop_id,season_id)(season_id) (crop_id)immutable_after_stateoperationalSection 6ข้อ 6
FieldCapabilityProfilefield_capability_profileprofile_id(field_id,method_version,computed_on)(field_id,computed_on) (capability_band)append_onlyoperationalSection 6ข้อ 6
CropValueEstimatecrop_value_estimatevalue_id—(crop_id,as_of) (expires_on)append_onlyconfidential_wallSection 6ข้อ 6
FieldMillDistancefield_mill_distancedistance_id(field_id,mill_id,method)(mill_id,distance_km) (valid_until)append_onlyoperationalSection 6ข้อ 6
RouteAnalysisroute_analysisrequest_id—(requested_by,requested_at) (field_id)append_onlyoperationalSection 6ข้อ 6
RoutingCreditLedgerrouting_credit_ledgerentry_id—(tenant_id,occurred_on)append_onlyoperationalSection 6ข้อ 6
SoilSeriessoil_seriesseries_id(code)(soil_group_id) (status)referencepublicSection 6ข้อ 6
UnitScaleTypeunit_scale_typescale_type_id(code,version)(department)referencepublicSection 6ข้อ 6
UnitScaleunit_scalestep_id(scale_type_id,rank,version)(scale_type_id)referencepublicSection 6ข้อ 6
SoilAnalysisTitlesoil_analysis_titletitle_id(code,version)(group)referencepublicSection 6ข้อ 6
ProductivityPartnershipproductivity_partnershippartnership_id—(recipient_tenant_id,season_id) (provider_tenant_id,status)immutable_after_stateconfidential_wallSection 6ข้อ 6
PartnershipLinepartnership_lineline_id—(partnership_id) (credit_line_id) (centre_id)immutable_after_stateconfidential_wallSection 6ข้อ 6
IdentityDisclosureidentity_disclosuredisclosure_id—(field_id,requested_at) (requester_tenant_id,outcome)append_onlyconsent_gatedSection 6ข้อ 6

8. Consistency boundaries8. ขอบเขตความสอดคล้อง (aggregate)

Transaction boundaries touching this perspective, from graph dataModeling.aggregates. Inside a boundary the stated invariants commit atomically in one database transaction; across boundaries effects flow through domain events (eventual consistency). Repository and unit-of-work lifetimes for these aggregates are specified in the sibling SPEC-DDD document (scoped per request — see the component lifetime map).

ขอบเขต transaction ที่เกี่ยวกับมุมมองนี้ จาก dataModeling.aggregates ใน graph ภายในขอบเขต invariant ที่ระบุ commit แบบ atomic ใน database transaction เดียว; ข้ามขอบเขตผลไหลผ่าน domain event (eventual consistency) lifetime ของ repository และ unit of work ของ aggregate เหล่านี้กำหนดในเอกสาร SPEC-DDD พี่น้อง (scoped ต่อคำขอ — ดูผัง lifetime ของ component)

Aggregate rootMembersสมาชิกContextTransaction ruleกติกา transaction
FieldFieldland_crop_registryLand facts only (PROP-001); geometry edits are single-row.ข้อเท็จจริงที่ดินเท่านั้น (PROP-001); แก้ขอบเขตแปลงเป็นรายแถว
CropCrop · FarmActivity · YieldEstimate · CropTransferland_crop_registryOwnership transfer appends a CropTransfer and updates owner_farmer_id in one transaction; activities and estimates append without touching crop state.การโอนกรรมสิทธิ์ append CropTransfer และแก้ owner_farmer_id ใน transaction เดียว; กิจกรรมและการประมาณผลผลิต append โดยไม่แตะสถานะอ้อย
WeatherObservationWeatherObservationfarm_agronomyAppend-only observation stream keyed by field or zone.สายข้อมูลสังเกตแบบ append-only อ้างแปลงหรือ zone
CaneVarietyCaneVarietyfarm_agronomyReference catalogue — operator-curated; crops pin a variety row.บัญชีอ้างอิง — operator ดูแล; อ้อยตรึงแถวพันธุ์ที่ใช้
SoilGroupSoilGroupfarm_agronomyReference catalogue — LDD soil groups; fields pin a group row.บัญชีอ้างอิง — กลุ่มชุดดิน LDD; แปลงตรึงแถวกลุ่มที่ใช้
CropCycleCropCyclefarm_agronomyThe cycle is first-class (P-5): a planting and its ratoons are one payback subject, because establishment is roughly 45% of a planting's cost and the season is the wrong unit of return. Exactly one open cycle per field; a new planting closes the previous cycle with a reason.อ้อยรุ่นเป็นวัตถุชั้นหนึ่ง (P-5): การปลูกและตอของมันคือหน่วยคืนทุนเดียวกัน เพราะต้นทุนการตั้งแปลงราว 45% ของการปลูก มีรุ่นเปิดได้แปลงละหนึ่งรุ่น การปลูกใหม่ปิดรุ่นเดิมพร้อมเหตุผล
LandRightLandRight · FieldRightland_rightsThe legal right to farm is one boundary: a right and the field shares carved from it commit together. A right is never edited into another right — a change of deed writes a new right and closes the old shares by date (append-only shares).สิทธิในที่ดินเป็นขอบเขตเดียว: สิทธิและส่วนแบ่งแปลงที่ตัดออกมาถูก commit ด้วยกัน สิทธิไม่ถูกแก้เป็นสิทธิอื่น — การเปลี่ยนโฉนดคือสิทธิใหม่และปิดส่วนแบ่งเดิมตามวันที่
TenureRecordTenureRecordland_rightsOne farmer holds one field on one basis over one period; overlapping tenure on the same field and period is rejected inside this boundary. Verification is a state on the record, never a separate truth.ชาวไร่หนึ่งรายถือแปลงหนึ่งบนฐานหนึ่งในช่วงเวลาหนึ่ง การถือครองซ้อนทับบนแปลงและช่วงเดียวกันถูกปฏิเสธในขอบเขตนี้
LeaseLeaseland_rightsA lease is frozen once it starts: rent, basis and term are the agreement, and a change is a new lease. Expiry never silently ends a tenure — the tenure record carries its own validity.สัญญาเช่าตรึงเมื่อเริ่มมีผล: ค่าเช่า เกณฑ์ และระยะเวลาคือข้อตกลง การเปลี่ยนคือสัญญาใหม่ การหมดอายุไม่ยุติการถือครองโดยเงียบ
DocumentDocument · DocumentPagedocument_vaultThe document and its pages commit as one: nothing leaves the device before durable-storage confirmation (NFR-101), and the phone releases the file only when the cloud confirms (P-20). Retention is the tenant's statutory period; deletion leaves a tombstone, never a hole.เอกสารและหน้าของมัน commit เป็นหนึ่งเดียว: ไม่มีอะไรออกจากเครื่องก่อนการยืนยันการจัดเก็บถาวร (NFR-101) และโทรศัพท์ปล่อยไฟล์เมื่อคลาวด์ยืนยันเท่านั้น (P-20)
FieldBoundaryFieldBoundaryland_crop_registryAppend-only: a re-survey supersedes exactly one earlier boundary and both stay readable, because area drives money. Every boundary states its method, instrument, accuracy and whether the tracer was independent of the farmer.append-only: การรังวัดใหม่แทนที่ขอบเขตเดิมหนึ่งรายการและทั้งคู่ยังอ่านได้ เพราะพื้นที่มีผลต่อเงิน ทุกขอบเขตระบุวิธี เครื่องมือ ความแม่นยำ และความเป็นอิสระของผู้รังวัด
LandHistoryLandHistoryland_crop_registryAppend-only seasonal use record; a correction adds a row rather than rewriting what the field was doing three seasons ago.บันทึกการใช้ที่ดินรายฤดูแบบ append-only; การแก้ไขคือการเพิ่มแถว ไม่ใช่การเขียนทับอดีต
FieldAliasFieldAliasland_crop_registryOne alias per (field, counterparty), issued once and frozen when the relationship ends. The alias is the ONLY handle a counterparty ever holds on a field — the wall is in the schema, not in a view (W-5).หนึ่งรหัสแทนต่อ (แปลง, คู่สัญญา) ออกครั้งเดียวและตรึงเมื่อความสัมพันธ์สิ้นสุด รหัสแทนคือสิ่งเดียวที่คู่สัญญาถือไว้ — กำแพงอยู่ใน schema ไม่ใช่ใน view (W-5)
FieldSurveyFieldSurveyfarm_agronomyAppend-only field visit record with its evidence; a survey is a fact about a day, never a mutable profile of the field.บันทึกการลงแปลงแบบ append-only พร้อมหลักฐาน การสำรวจคือข้อเท็จจริงของวันหนึ่ง ไม่ใช่โปรไฟล์ที่แก้ได้ของแปลง
FieldWaterSourceFieldWaterSourcefarm_agronomyAppend-only: water availability is observed and dated, because a borehole that ran dry last season is a different fact from one that never existed.append-only: ความพร้อมของน้ำเป็นสิ่งที่สังเกตและลงวันที่ เพราะบ่อที่แห้งเมื่อฤดูก่อนกับบ่อที่ไม่เคยมีเป็นคนละข้อเท็จจริง
IrrigationAssetIrrigationAssetfarm_agronomyThe asset carries its own cost centre and funding source: benefit, not size, decides capitalisation (P-4), and a shared asset allocates by declared rule rather than by assumption.สินทรัพย์ถือศูนย์ต้นทุนและแหล่งทุนของตัวเอง: ประโยชน์ที่ได้ ไม่ใช่ขนาด เป็นตัวตัดสินการบันทึกเป็นทุน (P-4)
BufferZoneBufferZonefarm_agronomyA zone belongs to its field and commits with it; width and naturalness are declared facts used by capability scoring, never by settlement.แนวกันชนเป็นของแปลงและ commit ไปกับแปลง ความกว้างและความเป็นธรรมชาติใช้ในการประเมินศักยภาพ ไม่ใช่การชำระเงิน
SoilAnalysisSoilAnalysis · SoilAnalysisResultfarm_agronomyThe analysis and its result rows are one boundary: results are append-only against a sampling that is frozen once analysed, and every value resolves through the reference title and unit scale rather than free text.การวิเคราะห์และแถวผลเป็นขอบเขตเดียว: ผลเป็น append-only บนการเก็บตัวอย่างที่ตรึงเมื่อวิเคราะห์แล้ว และทุกค่าอ้างผ่านหัวข้อและมาตรวัดอ้างอิง ไม่ใช่ข้อความอิสระ
PlantingPlantingfarm_agronomyAppend-only: a planting is the act that opens a crop cycle's establishment cost, so it is recorded once with its variety, mode, seed quantity and area, and corrected by a superseding entry.append-only: การปลูกคือการกระทำที่เปิดต้นทุนการตั้งแปลงของอ้อยรุ่น จึงบันทึกครั้งเดียวพร้อมพันธุ์ วิธี ปริมาณพันธุ์ และพื้นที่
SoilAdjustmentSoilAdjustmentfarm_agronomyAppend-only cultivation act; where a work order exists the two reconcile, and the cost posts through the ledger dimension rather than living here.การกระทำทางเพาะปลูกแบบ append-only; เมื่อมีใบสั่งงานทั้งสองกระทบยอดกัน และต้นทุน post ผ่านมิติของสมุดบัญชี
CropOutcomeCropOutcomefarm_agronomyOne outcome per crop per season, frozen at close: it is the denominator of every yield and cost-per-tonne figure, so it never moves after the season closes.หนึ่งผลผลิตต่ออ้อยหนึ่งรุ่นต่อฤดู ตรึงเมื่อปิด: เป็นตัวหารของทุกตัวเลขผลผลิตและต้นทุนต่อตัน จึงไม่ขยับหลังปิดฤดู
FieldCapabilityProfileFieldCapabilityProfilefarm_agronomyAppend-only computed profile pinning its method version and input snapshot, so a band computed last season can be re-read exactly as it was scored. A profile is advice about a field, never a permission.โปรไฟล์ที่คำนวณแบบ append-only ตรึงเวอร์ชันวิธีและ snapshot ข้อมูลเข้า เพื่ออ่านย้อนได้ตรงตามที่เคยให้คะแนน โปรไฟล์คือคำแนะนำเกี่ยวกับแปลง ไม่ใช่สิทธิ์
CropValueEstimateCropValueEstimatefarm_agronomyAppend-only and expiring: an estimate is never a settlement (V-1) and every figure shows its basis (V-2). Valuations are as confidential as prices (V-3) and stay behind the wall.append-only และมีวันหมดอายุ: การประเมินไม่ใช่การชำระ (V-1) และทุกตัวเลขแสดงเกณฑ์ของมัน (V-2) การประเมินมูลค่าเป็นความลับเท่ากับราคา (V-3)
FieldMillDistanceFieldMillDistancefarm_agronomyAppend-only per (field, mill, method) with a validity horizon: a distance is a computed fact with a source and an age, never a constant.append-only ต่อ (แปลง, โรงงาน, วิธี) พร้อมอายุความถูกต้อง: ระยะทางคือข้อเท็จจริงที่คำนวณโดยมีแหล่งที่มาและอายุ ไม่ใช่ค่าคงที่
RouteAnalysisRouteAnalysis · RoutingCreditLedgerfarm_agronomyThe request and its credit debit commit together — a routing call that consumed credit is recorded even when the provider degraded, so the balance always reconciles to the ledger of debits and grants.คำขอและการหักเครดิต commit ด้วยกัน — การเรียกเส้นทางที่ใช้เครดิตถูกบันทึกแม้ผู้ให้บริการจะให้ผลลดทอน ยอดคงเหลือจึงกระทบยอดกับบัญชีเสมอ
SoilSeriesSoilSeriesfarm_agronomyPlatform reference catalogue: versioned centrally, never authored by a tenant; retired series stay readable so historic analyses keep their meaning.บัญชีอ้างอิงของ platform: กำหนดเวอร์ชันจากส่วนกลาง tenant ไม่เขียนเอง ชุดที่เลิกใช้ยังอ่านได้เพื่อให้ผลวิเคราะห์เก่ายังมีความหมาย
UnitScaleTypeUnitScaleType · UnitScalefarm_agronomyA scale type and its ordered steps version together: a result recorded against version 2 of a scale is never silently re-read against version 3.ชนิดมาตรวัดและขั้นของมันเปลี่ยนเวอร์ชันด้วยกัน: ผลที่บันทึกบนเวอร์ชัน 2 ไม่ถูกอ่านใหม่บนเวอร์ชัน 3 อย่างเงียบ ๆ
SoilAnalysisTitleSoilAnalysisTitlefarm_agronomyVersioned reference catalogue of analysis titles and their units; a title binds the unit scale a result may use.บัญชีอ้างอิงหัวข้อการวิเคราะห์และหน่วยแบบมีเวอร์ชัน หัวข้อผูกมาตรวัดที่ผลจะใช้ได้
ProductivityPartnershipProductivityPartnership · PartnershipLinefield_partnershipThe partnership and its lines are one two-act boundary: proposed by one side, active on the other's acceptance, and every line names its settlement route so support money is recorded as support, with margin-without-it always visible (P-8).ความร่วมมือและบรรทัดของมันเป็นขอบเขตสองจังหวะเดียว: ฝ่ายหนึ่งเสนอ อีกฝ่ายตอบรับ และทุกบรรทัดระบุเส้นทางการชำระ เงินสนับสนุนจึงถูกบันทึกเป็นการสนับสนุน
IdentityDisclosureIdentityDisclosurefield_partnershipAppend-only: a granted disclosure stands on a field_identity ConsentGrant and an ungranted request records the neutral outcome only (W-6) — the absence of an answer must never itself be an answer.append-only: การเปิดเผยที่ได้รับอนุญาตยืนบน ConsentGrant field_identity ส่วนคำขอที่ไม่ได้รับอนุญาตบันทึกเพียงผลลัพธ์ที่เป็นกลาง (W-6)

9. Cross-perspective contracts9. สัญญาข้ามมุมมอง

10. The land, capability & cultivation extension (PROP-048)10. ส่วนขยายเรื่องที่ดิน ศักยภาพ และการเพาะปลูก (PROP-048)

Spec v0.26.0 adds three contexts and twenty-two records the cane farmer owns, plus ten columns on Field and sixteen on Crop. The shape of the addition is the argument: geometry is versioned, tenure is dated, evidence is graded, observations that change live in the survey that saw them, and every derived number carries its inputs. Column-level persistence profiles for these records ride the PROP-019 Q5 back-audit; the tables below are the normative attribute register mirrored from the graph.

spec v0.26.0 เพิ่ม context สามชุดและ record ยี่สิบสองรายการที่ลูกไร่เป็นเจ้าของ พร้อม column สิบรายการบน Field และสิบหกรายการบน Crop รูปแบบของสิ่งที่เพิ่มคือเหตุผลของมันเอง: รูปทรงจัดเป็นรุ่น สิทธิในที่ดินมีวันที่ หลักฐานมีระดับ ข้อสังเกตที่เปลี่ยนได้อยู่ในบันทึกการสำรวจที่เห็นมัน และตัวเลขที่คำนวณทุกตัวพาที่มาไปด้วย โปรไฟล์การจัดเก็บระดับ column ของ record เหล่านี้จะทำในรอบตรวจย้อนหลัง PROP-019 Q5 ตารางด้านล่างคือทะเบียน attribute ตามบรรทัดฐานที่สะท้อนมาจาก graph

10.1 Land rights (land_rights) — the right to farm as a document trail10.1 สิทธิในที่ดิน (land_rights) — สิทธิทำกินในรูปร่องรอยเอกสาร

EntityEntityAttributesattributeRules that biteกฎที่มีผล
LandRight เอกสารสิทธิ์right_id · right_type · deed_no · ravang? · survey_page? · book_no? · page_no? · land_no? · tumboon? · amphor? · province · area_rai · area_ngan · area_wa · area_sqm · issued_on? · holder_tenant_id? · geometry? · document_id · statusright_id · right_type · deed_no · ravang? · survey_page? · book_no? · page_no? · land_no? · tumboon? · amphor? · province · area_rai · area_ngan · area_wa · area_sqm · issued_on? · holder_tenant_id? · geometry? · document_id · statusright_type decides which registry identifiers are required. The four-part ไร่/งาน/ตารางวา/ตารางเมตร area is the REGISTRY figure and never the field governing area. geometry? is reference-grade cadastral shape only: the measured boundary always governs area and money, and divergence beyond tolerance raises a task, never a block (OQ-10).ประเภทเอกสารสิทธิ์เป็นตัวกำหนดว่าต้องมีเลขทะเบียนใด พื้นที่สี่ส่วน ไร่/งาน/ตารางวา/ตารางเมตร เป็นตัวเลขของทะเบียน ไม่ใช่พื้นที่ที่ใช้คิดเงินของแปลง geometry? เป็นรูปแปลงจากทะเบียนเพื่ออ้างอิงเท่านั้น: ขอบเขตที่วัดได้เป็นตัวตัดสินพื้นที่และเงินเสมอ และหากต่างเกินเกณฑ์จะเปิดงานตรวจ ไม่ใช่ห้ามบันทึก (OQ-10)
FieldRight สิทธิของแปลงfield_right_id · right_id · field_id · share_pct? · from_date · to_date?field_right_id · right_id · field_id · share_pct? · from_date · to_date?N:N by necessity — one deed may hold several fields, one field may straddle several deeds. A subdivision opens NEW fields and closes the old one; rows are dated out, never edited (OQ-11).เป็น N:N โดยจำเป็น — โฉนดใบเดียวมีหลายแปลงได้ แปลงเดียวคาบหลายโฉนดได้ การแบ่งแปลงจะเปิดแปลงใหม่และปิดแปลงเดิม แถวเดิมปิดด้วยวันที่ ไม่ใช่แก้ทับ (OQ-11)
TenureRecord สถานะถือครองtenure_id · field_id · farmer_id · basis · right_id? · lease_id? · valid_from · valid_to? · evidence · verified_by? · statustenure_id · field_id · farmer_id · basis · right_id? · lease_id? · valid_from · valid_to? · evidence · verified_by? · statusAppend-only. Exactly ONE governing row per (field, season) — T-2; overlaps are a field-officer task and are never shown as a conflict to either claimant (W-4). basis is a right in LAND (owner | sub_farmer | lease | state_allocation | permitted_use), deliberately split from the commercial network relation. T-1: absent tenure never blocks registration, farming or delivery.append-only มีแถวที่มีผลหนึ่งเดียวต่อ (แปลง ฤดู) ตาม T-2; การทับซ้อนเป็นงานของเจ้าหน้าที่ภาคสนาม และไม่แสดงเป็นความขัดแย้งให้ผู้อ้างสิทธิฝ่ายใดเห็น (W-4) ฐานสิทธิเป็นสิทธิในที่ดิน (เจ้าของ | ลูกไร่ | เช่า | ที่จัดสรรจากรัฐ | ได้รับอนุญาตให้ใช้) แยกออกจากความสัมพันธ์เชิงพาณิชย์ในเครือข่ายอย่างตั้งใจ T-1: ไม่มีสิทธิก็ไม่กีดขวางการขึ้นทะเบียน การทำไร่ หรือการส่งมอบ
Lease สัญญาเช่าlease_id · landlord_tenant_id · lessee_farmer_id · document_id? · start_on · end_on · rent_amount · rent_basis · renewal · statuslease_id · landlord_tenant_id · lessee_farmer_id · document_id? · start_on · end_on · rent_amount · rent_basis · renewal · statusThe landlord is a Tenant and may be a non-user (a virtual tenant with an unclaimed person). rent_basis: per_rai_season | per_year | cane_share; amounts in baht 2 dp. Expiry inside the funding horizon fails the enrollment condition (T-3) and fires LeaseExpiring one season ahead.เจ้าของที่ดินเป็น Tenant และอาจไม่เป็นผู้ใช้ระบบ (tenant แบบ virtual ที่ยังไม่มีผู้อ้างสิทธิ์) เกณฑ์ค่าเช่า: รายไร่ต่อฤดู | รายปี | แบ่งอ้อย จำนวนเงินเป็นบาททศนิยมสองตำแหน่ง หากหมดอายุก่อนสิ้นระยะคืนทุนถือว่าไม่ผ่านเงื่อนไขการเข้าร่วม (T-3) และจะยิง LeaseExpiring ล่วงหน้าหนึ่งฤดู

10.2 Ground truth on the field (land_crop_registry · farm_agronomy)10.2 ข้อมูลจริงของแปลง (land_crop_registry · farm_agronomy)

EntityEntityAttributesattributeRules that biteกฎที่มีผล
FieldBoundary ขอบเขตแปลงboundary_id · field_id · geometry · area_rai_calc · method · instrument? · accuracy_m · surveyed_by · surveyor_kind · independent · trace_quality · confidence · effective_from · supersedes_id?boundary_id · field_id · geometry · area_rai_calc · method · instrument? · accuracy_m · surveyed_by · surveyor_kind · independent · trace_quality · confidence · effective_from · supersedes_id?Append-only: a re-walk APPENDS a version. Area is computed in a metre-based projected CRS (A-1). Any Membership may measure and all of them are recorded — capacity, method, instrument, trace quality and beneficiary-independence are immutable on the version (M-1, NFR-79). confidence is derived and escalates to an independent re-measure; it never blocks (FR-251).append-only: การเดินวัดใหม่เพิ่มรุ่นใหม่ พื้นที่คำนวณบน projection หน่วยเมตร (A-1) Membership ใดก็วัดได้และบันทึกทุกราย — บทบาท วิธี เครื่องมือ คุณภาพ trace และความเป็นอิสระจากผลประโยชน์แก้ไขไม่ได้บนรุ่นนั้น (M-1, NFR-79) ค่า confidence เป็นค่าที่คำนวณและนำไปสู่การวัดซ้ำโดยผู้เป็นกลาง ไม่ใช่การกีดกัน (FR-251)
LandHistory ประวัติที่ดินhistory_id · field_id · from_season · to_season? · use · event? · yield_t_per_rai? · note?history_id · field_id · from_season · to_season? · use · event? · yield_t_per_rai? · note?One row per episode; the field carries the multi-season history that outlives every crop on it (P-2). The time axis is Season — never a parallel Year.หนึ่งแถวต่อหนึ่งเหตุการณ์; แปลงเก็บประวัติข้ามฤดูที่อยู่ยืนกว่าอ้อยทุกรุ่นบนมัน (P-2) แกนเวลาคือ Season ไม่มี Year ขนานกัน
FieldSurvey การสำรวจแปลงsurvey_id · field_id · season_id? · surveyed_on · surveyed_by · purpose · evidence · findings_ref?survey_id · field_id · season_id? · surveyed_on · surveyed_by · purpose · evidence · findings_ref?Provenance for every capability fact — a stale field shows as a DATE, not as a wrong number. Current values sit on Field for fast reads; the history sits here.ที่มาของข้อเท็จจริงศักยภาพทุกรายการ — แปลงที่ข้อมูลเก่าจะปรากฏเป็นวันที่ ไม่ใช่ตัวเลขที่ผิด ค่าปัจจุบันอยู่บน Field เพื่ออ่านเร็ว ประวัติอยู่ที่นี่
FieldWaterSource · IrrigationAsset · BufferZoneFWS: source_id · field_id · water_source_kind · surveyed_on · surveyed_by · months_available · reliability ·|· IRA: asset_id · field_id? · farmer_id · kind · capacity_m3? · pump_kw? · months_available · shared · installed_on? ·|· BFZ: zone_id · field_id · width_m · is_natural · description?FWS: source_id · field_id · water_source_kind · surveyed_on · surveyed_by · months_available · reliability ·|· IRA: asset_id · field_id? · farmer_id · kind · capacity_m3? · pump_kw? · months_available · shared · installed_on? ·|· BFZ: zone_id · field_id · width_m · is_natural · description?Water is a register, not an enum (P-4); availability is observed, so every row carries a survey date and a surveyor. IrrigationAsset with field_id null serves the whole holding. A buffer belongs to the LAND and survives the season.น้ำเป็นทะเบียน ไม่ใช่ enum (P-4); ความพร้อมใช้เป็นสิ่งที่สังเกต ทุกแถวจึงมีวันสำรวจและผู้สำรวจ IrrigationAsset ที่ field_id ว่างใช้ได้ทั้งพื้นที่ถือครอง แนวป้องกันเป็นของที่ดิน และอยู่ข้ามฤดู
SoilAnalysis · SoilAnalysisResultSAN: analysis_id · field_id · farmer_id · sampling_no · sampled_on · analysed_on? · sample_point · sample_weight_g? · sampled_by · document_id? · lab_ref? · status · remark? ·|· SAR: result_id · analysis_id · title_id · value_num? · unit? · unit_scale_step_id? · text_value? · remark?SAN: analysis_id · field_id · farmer_id · sampling_no · sampled_on · analysed_on? · sample_point · sample_weight_g? · sampled_by · document_id? · lab_ref? · status · remark? ·|· SAR: result_id · analysis_id · title_id · value_num? · unit? · unit_scale_step_id? · text_value? · remark?The analysis has ONE link to Field; the farmer is derivable from tenure at the sampling date (the source research second link is deliberately not adopted). sample_point must fall inside the current effective boundary. unit is mandatory whenever value_num is present. Measurement rows and advice rows are the same shape, separated by their title group — advice never feeds money (S-1).การวิเคราะห์มีการเชื่อมไป Field ทางเดียว; ตัวเกษตรกรได้จากสถานะถือครอง ณ วันเก็บตัวอย่าง (การเชื่อมที่สองของ model ต้นทางไม่ถูกนำมาใช้อย่างตั้งใจ) จุดเก็บตัวอย่างต้องอยู่ในขอบเขตที่มีผลปัจจุบัน ต้องมีหน่วยทุกครั้งที่มีค่าตัวเลข แถวค่าที่วัดและแถวคำแนะนำมีรูปแบบเดียวกัน แยกด้วยกลุ่มของหัวข้อ — คำแนะนำห้ามเป็น input ของเรื่องเงิน (S-1)
Planting · SoilAdjustment · CropExpense · CropOutcomePLN: planting_id · crop_id · planting_kind · planted_on · area_rai · mode · variety_id · seed_qty · seed_qty_unit · cost? · note? ·|· SAJ: adjustment_id · crop_id? · field_id? · activity · equipment_type? · performed_on · amount? · unit? · cost? · description? · work_order_id? ·|· CEX: expense_id · crop_id · expense_type · amount · incurred_on · payer_tenant_id · partnership_line_id? · credit_item_id? ·|· COU: outcome_id · crop_id · season_id · harvested_area_rai · tonnage_t · t_per_rai · avg_ccs? · source · closed_onPLN: planting_id · crop_id · planting_kind · planted_on · area_rai · mode · variety_id · seed_qty · seed_qty_unit · cost? · note? ·|· SAJ: adjustment_id · crop_id? · field_id? · activity · equipment_type? · performed_on · amount? · unit? · cost? · description? · work_order_id? ·|· CEX: expense_id · crop_id · expense_type · amount · incurred_on · payer_tenant_id · partnership_line_id? · credit_item_id? ·|· COU: outcome_id · crop_id · season_id · harvested_area_rai · tonnage_t · t_per_rai · avg_ccs? · source · closed_onAll append-only. Gap-filling (ปลูกซ่อม) is a SECOND Planting on the same Crop, never a new crop; seed_qty_unit is never optional and canonicalizes to tonnes (OQ-14). A SoilAdjustment is auto-created from a verified work order where one exists. A CropExpense points back at the partnership line or credit item that produced it, so cost-per-tonne cannot double count. CropOutcome source: derived (settled deliveries) | declared.ทั้งหมดเป็น append-only การปลูกซ่อมคือการปลูกครั้งที่สองบนอ้อยรุ่นเดิม ไม่ใช่อ้อยรุ่นใหม่; หน่วยของปริมาณท่อนพันธุ์บังคับเสมอและใช้ตันเป็นหน่วยหลัก (OQ-14) SoilAdjustment สร้างอัตโนมัติจากใบสั่งงานที่ตรวจรับแล้วเมื่อมี CropExpense ชี้กลับไปยังรายการความร่วมมือหรือรายการสินเชื่อต้นทาง ต้นทุนต่อตันจึงไม่นับซ้ำ ที่มาของ CropOutcome: คำนวณจากการส่งมอบที่ชำระแล้ว | แจ้งเอง

10.3 Extended columns & what the farmer only reads10.3 column ที่ขยาย และสิ่งที่ลูกไร่อ่านได้เท่านั้น

Field gains the measured-area pair (area_rai_declared / area_rai_measured / area_basis = declared | measured / area_confidence), the centroid and the PROP-047 tumboon/amphor/province codes resolved from it, terrain (slope_deg along the row, cross_slope_deg across it, elevation, length, width, topography), soil classification (soil_series_id under the existing group, texture, structure, colour), workability grades and road_access. Crop gains crop period, plan type, row geometry, seed source/supplier/quantity with its unit, target yield, renovation and rotation, and enrollment_id?. CaneVariety gains an image and is_juice_cane; YieldEstimate gains a stated method, the profile it read, confidence and as-of; FarmActivity gains enrollment_id?. Read-only from this side: FieldAlias, FieldCapabilityProfile, CropValueEstimate, ProductivityPartnership/PartnershipLine, ProgramEnrollment, IdentityDisclosure (SPEC-ERD-CFQ) and Document/DocumentPage (SPEC-ERD-FED).

Field เพิ่มคู่พื้นที่ที่วัดได้ (area_rai_declared / area_rai_measured / area_basis = แจ้งเอง | วัดแล้ว / area_confidence) จุดศูนย์กลาง และรหัส tumboon/amphor/province ตาม PROP-047 ที่ resolve จากจุดนั้น ข้อมูลภูมิประเทศ (slope_deg ตามร่อง cross_slope_deg ขวางร่อง ความสูง ความยาว ความกว้าง ลักษณะภูมิประเทศ) การจำแนกดิน (soil_series_id ใต้กลุ่มชุดดินเดิม เนื้อดิน โครงสร้าง สีดิน) ระดับความพร้อมใช้งาน และ road_access ส่วน Crop เพิ่มฤดูปลูก แผนการปลูก รูปทรงร่อง ที่มา/แหล่งซื้อ/ปริมาณท่อนพันธุ์พร้อมหน่วย เป้าผลผลิต การรื้อปลูกและพืชหมุนเวียน และ enrollment_id? CaneVariety เพิ่มภาพและ is_juice_cane; YieldEstimate เพิ่มการระบุวิธีคิด โปรไฟล์ที่อ่าน ค่าความเชื่อมั่น และวันอ้างอิง; FarmActivity เพิ่ม enrollment_id? ฝั่งนี้อ่านได้เท่านั้น: FieldAlias, FieldCapabilityProfile, CropValueEstimate, ProductivityPartnership/PartnershipLine, ProgramEnrollment, IdentityDisclosure (SPEC-ERD-CFQ) และ Document/DocumentPage (SPEC-ERD-FED)

Applied — PROP-050 · spec v0.28.0apply แล้ว — PROP-050 · spec v0.28.0

PROP-050 (spec v0.28.0) — cost centres to field & crop level: the farmer's plantation ledger. The grower's books gain a cost dimension, not a second book: five columns on every journal line (centre_id · cost_class · alloc_id · qty · qty_unit) over a derived CostCentre register — holding → field → crop cycle → crop, with asset and overhead-pool attachments and no farmer-defined nesting. The CropCycle (one planting plus its ratoons) becomes the unit of return and carries the establishment asset, capitalised at first revenue, amortised on units of production and impaired only with a named cause and a date. Field capture is two decisions and under fifteen seconds, works offline, and opens from four doors into one sheet; the receipt is photographed into the PROP-048 document vault and the phone releases the file only once the cloud confirms durable storage. Eight artifacts S-1…S-8 — crop P&L · cycle statement · field lifetime · consolidated plantation · cost structure with a k-anonymous benchmark · settlement per crop · practice comparison · scenario & replant signal — every one computed from posted lines only and printing its own uncertainty. Capture, evidence and S-1/S-2/S-3/S-4/S-6 sit in the base grower entitlement, free and permanent; S-5/S-7/S-8 form the analytics tier. Owned land carries no imputed rent and family labour is off by default, so the bottom line is named return to land and own labour. FR-267…312 · NFR-87…106 · WF-96…111. PROP-048's CropExpense is withdrawn as a store and becomes a capture form that posts.

PROP-050 (spec v0.28.0) — ศูนย์ต้นทุนถึงระดับแปลงและอ้อยรุ่น: สมุดต้นทุนไร่ของชาวไร่ สมุดบัญชีของชาวไร่ได้ มิติต้นทุน ไม่ใช่สมุดเล่มที่สอง: ห้าคอลัมน์บนทุกบรรทัดบัญชี (centre_id · cost_class · alloc_id · qty · qty_unit) บนทะเบียน CostCentre ที่ระบบสร้างเอง — ทั้งไร่ → แปลง → รอบปลูก → อ้อยรุ่น พร้อมส่วนที่มาเกาะคือสินทรัพย์และกองต้นทุน และไม่มีการซ้อนชั้นที่ชาวไร่กำหนดเอง CropCycle (การปลูกหนึ่งครั้งพร้อมอ้อยตอ) เป็นหน่วยของผลตอบแทนและถือสินทรัพย์ต้นทุนก่อตั้ง ซึ่งบันทึกเป็นสินทรัพย์เมื่อมีรายได้ครั้งแรก ตัดจำหน่ายตามหน่วยผลผลิต และด้อยค่าได้เฉพาะเมื่อมีสาเหตุและวันที่ระบุ การบันทึกหน้างานใช้การตัดสินใจสองครั้ง ไม่เกินสิบห้าวินาที ทำงานออฟไลน์ และเปิดได้จากสี่ประตูเข้าสู่แบบเดียวกัน ใบเสร็จถูกถ่ายเก็บเข้าคลังเอกสารของ PROP-048 และโทรศัพท์ปล่อยไฟล์ออกเมื่อคลาวด์ยืนยันแล้วเท่านั้น ชิ้นงานแปดชิ้น S-1…S-8 คำนวณจากบรรทัดที่ลงบัญชีแล้วเท่านั้น และแสดงความไม่แน่นอนของตัวเองทุกชิ้น การบันทึก หลักฐาน และ S-1/S-2/S-3/S-4/S-6 อยู่ในสิทธิพื้นฐานของชาวไร่ ฟรีถาวร ส่วน S-5/S-7/S-8 เป็นรุ่นวิเคราะห์ ที่ดินของตนเองไม่คิดค่าเช่าโดยอนุมาน และแรงงานครอบครัวปิดไว้เป็นค่าตั้งต้น บรรทัดสุดท้ายจึงเรียกว่า ผลตอบแทนต่อที่ดินและแรงงานตนเอง FR-267…312 · NFR-87…106 · WF-96…111 และ CropExpense ของ PROP-048 ถูกถอนออกจากการเป็นที่เก็บข้อมูล กลายเป็นแบบบันทึกที่ลงรายการบัญชี

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

12. Revision history12. ประวัติการแก้ไข

RevฉบับDateวันที่Changesการเปลี่ยนแปลง
1.02026-07-07Initial version — PROP-002 Proposal A (spec v3.0): cane-farmer perspective of the v2.4 data modelฉบับแรก — PROP-002 ข้อเสนอ A (spec (สเปก) v3.0): มุมมองลูกไร่ต่อ model ข้อมูล v2.4
1.12026-07-08PROP-005 (FED, spec v6.0): perspective re-keyed from customer group to capacity (document code unchanged); identity defers to the federation context (Person · Tenant · TenantCapacity · Membership); every *_tenant_type + *_tenant_id pair collapses to tenant_id.PROP-005 (FED, spec v6.0): มุมมองเปลี่ยนคีย์จากกลุ่มลูกค้าเป็น capacity (รหัสเอกสารคงเดิม); อัตลักษณ์อ้างอิงบริบท federation (Person · Tenant · TenantCapacity · Membership); คู่ *_tenant_type + *_tenant_id ทั้งหมดยุบเป็น tenant_id
1.22026-07-09PROP-009 (STR, spec v8.0): the cane farmer shares StrategicAgreement / PremiumAccrual / PremiumRelease (as the mill's counterparty) and OnwardPremiumSettlement (as the quota farmer's sub-farmer); joins the strategic_pricing context (WF-31 · WF-34). The premium is confidential, paid on top of the statutory price and never a PaymentItem component (NFR-21).PROP-009 (STR, spec v8.0): ลูกไร่ใช้ร่วม StrategicAgreement / PremiumAccrual / PremiumRelease (ในฐานคู่สัญญาของโรงงาน) และ OnwardPremiumSettlement (ในฐานลูกไร่ของหัวหน้าโควต้า); เข้าร่วมบริบท strategic_pricing (WF-31 · WF-34) เงินเพิ่มเป็นความลับ จ่ายเพิ่มจากราคาตามกฎหมาย ไม่เป็นส่วนของ PaymentItem (NFR-21)
1.32026-07-09PROP-010 (GL, spec v9.0): the cane farmer keeps books too — shares LedgerAccount / JournalEntry / ChartTemplate / Invoice / Receipt / PaymentVoucher / CashAccount / BankTransaction / Reconciliation / FiscalPeriod / FinancialStatement (a deliberately simple, cash-basis-by-default cash book that still posts double-entry); joins books/receivables/cash_management (WF-36…41). Cane income and input costs auto-post from settlement & เงินเกี๊ยว; statements shared to a bank only via ConsentGrant scope books (NFR-24…26).PROP-010 (GL, spec v9.0): ลูกไร่มี books เช่นกัน — ใช้ร่วม LedgerAccount / JournalEntry / ChartTemplate / Invoice / Receipt / PaymentVoucher / CashAccount / BankTransaction / Reconciliation / FiscalPeriod / FinancialStatement (สมุดเงินสดอย่างง่ายเกณฑ์เงินสดที่ยังลง double-entry ข้างใต้); เข้าร่วม books/receivables/cash_management (WF-36…41) รายได้ค่าอ้อยและต้นทุนลงอัตโนมัติจากการปิดยอดและเงินเกี๊ยว; แบ่งงบให้ธนาคารผ่าน ConsentGrant scope books (NFR-24…26)
1.42026-07-10PROP-012 (settlement & CCS-by-re-note correction, spec v10.0): consistent with the master — the cane farmer's CCS comes from the government (สอน.) re-note surfaced online (not an on-site same-day lab), net tonnage is instant at weigh-out, and settlement is the statutory two-installment schedule on the initial price with a season-end final-price true-up.PROP-012 (แก้การจ่ายเงินและ CCS จากรีโน้ต, spec v10.0): สอดคล้องกับแม่บท — CCS ของลูกไร่มาจากรีโน้ตของรัฐ (สอน.) ที่แสดงออนไลน์ (ไม่ใช่แล็บในโรงงานวันเดียว) น้ำหนักรู้ทันทีตอนชั่งออก และการจ่ายเป็นสองงวดตามกฎหมายบนราคาขั้นต้นพร้อมสรุปราคาสุดท้ายปลายฤดู
1.52026-07-10PROP-011 (GL, spec v12.0): the cane farmer shares BooksProfile — fixed unified edition with a cash_book ledger view (money-in / money-out) that still posts full double-entry underneath (FR-106, NFR-32).PROP-011 (GL, spec v12.0): ชาวไร่อ้อยใช้ร่วม BooksProfile — รุ่น unified ตายตัว มุมมอง cash_book (เงินเข้า / เงินออก) ที่ยังลง double-entry เต็มข้างใต้ (FR-106, NFR-32)
0.1.02026-07-11PROP-014 (spec v0.1.0): semantic versioning restarted at 0.1.0 (was Rev 1.5 · 2026-07-10); 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.5 · 2026-07-10); ปรับ docnav ตามการแยก gov_cluster — ย้าย GOV ไป docs/gov/ocsb/ เพิ่มพี่น้อง BOARD (กอน.)
0.2.02026-07-13PROP-018 (spec v0.4.0): comprehensive perspective data modeling — scoped entity-relationship diagrams (Fig. 1–2), column-level persistence profiles for the 7 home entities (Section 6), keys / indexes / mutability & PDPA classes (Section 7) and aggregate consistency boundaries (Section 8) — all rendered from the graph's new dataModeling block.PROP-018 (spec v0.4.0): การ model ข้อมูลรายมุมมองฉบับครบ — แผนภาพความสัมพันธ์ entity เฉพาะมุมมอง (ภาพที่ 1–2), persistence profile ระดับ column ของ entity ที่ home อยู่ฉบับนี้ 7 รายการ (ข้อ 6), key / index / ชั้น mutability และ PDPA (ข้อ 7) และขอบเขตความสอดคล้องของ aggregate (ข้อ 8) ทั้งหมด render จาก block ใหม่ dataModeling ใน graph
0.3.02026-07-25PROP-048 (spec v0.26.0): new Section 10 — the land, capability & cultivation extension. Adds the land_rights context (LandRight · FieldRight · TenureRecord · Lease), append-only FieldBoundary versions with measurer and independence, LandHistory, FieldSurvey / FieldWaterSource / IrrigationAsset / BufferZone, the SoilAnalysis + SoilAnalysisResult pair on shared ordinal scales, the cultivation record (Planting · SoilAdjustment · CropExpense · CropOutcome) and the extended Field / Crop / CaneVariety / YieldEstimate / FarmActivity columns. Column-level persistence profiles ride the PROP-019 Q5 back-audit.PROP-048 (spec v0.26.0): เพิ่มข้อ 10 — ส่วนขยายเรื่องที่ดิน ศักยภาพ และการเพาะปลูก เพิ่ม context land_rights (LandRight · FieldRight · TenureRecord · Lease) การจัดรุ่นขอบเขตแบบ append-only ที่บันทึกผู้วัดและความเป็นอิสระ LandHistory, FieldSurvey / FieldWaterSource / IrrigationAsset / BufferZone คู่ SoilAnalysis + SoilAnalysisResult บนชั้นเชิงอันดับที่ใช้ร่วมกัน บันทึกการเพาะปลูก (Planting · SoilAdjustment · CropExpense · CropOutcome) และ column ที่ขยายบน Field / Crop / CaneVariety / YieldEstimate / FarmActivity โปรไฟล์การจัดเก็บระดับ column จะทำในรอบตรวจย้อนหลัง PROP-019 Q5
0.4.02026-07-27PROP-050 (spec v0.28.0, approved & applied 27 Jul 2026; all 26 OQs client-closed): cost centres to field & crop level — the cost dimension on the ledger, the crop cycle and its establishment asset, declared allocation, evidence in the cloud, the network lending branch, FR-267…312 / NFR-87…106 / WF-96…111PROP-050 (spec v0.28.0 อนุมัติและ apply 27 ก.ค. 2569; ปิดคำถามเปิดครบ 26 ข้อ): ศูนย์ต้นทุนถึงระดับแปลงและอ้อยรุ่น — มิติต้นทุนบนสมุดบัญชี รอบปลูกและสินทรัพย์ต้นทุนก่อตั้ง การปันส่วนที่ประกาศไว้ หลักฐานบนคลาวด์ กิ่งการให้ยืมของเครือข่าย FR-267…312 / NFR-87…106 / WF-96…111
0.5.02026-07-28Physical-model batch 1 (spec v0.28.1) — persistence profile authored for CropCycle (the v0.28.0 payback subject homed here), with its Section 7 key row and Section 8 consistency boundary: exactly one open cycle per field, a new planting closes the previous cycle with a reason. Approved physical-model mandate, authority rule 6. No model change.ก้อนที่ 1 ของแบบจำลองเชิงกายภาพ (spec v0.28.1) — เขียน persistence profile ให้ CropCycle พร้อมแถวข้อ 7 และขอบเขตข้อ 8: หนึ่งแปลงมีรุ่นเปิดได้หนึ่งรุ่น การปลูกใหม่ปิดรุ่นเดิมพร้อมเหตุผล ไม่มีการเปลี่ยนแบบจำลอง
0.6.02026-07-28Physical-model batch 2 (spec v0.28.2) — the v0.26.0 block (PROP-048) cleared under authority rule 6: persistence profiles for the thirty entities homed here across land_rights (LandRight · FieldRight · TenureRecord · Lease), document_vault (Document · DocumentPage), land_crop_registry (FieldBoundary · LandHistory · FieldAlias), farm_agronomy (surveys, water, irrigation assets, buffer zones, soil analysis + results, planting, adjustments, outcomes, capability, valuation, distance, routing, and the four reference catalogues) and field_partnership (ProductivityPartnership · PartnershipLine · IdentityDisclosure), with Section 7 key rows and Section 8 consistency boundaries. CropExpense stays unprofiled — v0.28.0 withdrew it as a store. No model change.ก้อนที่ 2 ของแบบจำลองเชิงกายภาพ (spec v0.28.2) — เคลียร์ก้อน v0.26.0 (PROP-048) ตามกติกาอำนาจข้อ 6: เขียน persistence profile ให้ entity สามสิบตัวที่ home ในเอกสารนี้ พร้อมแถวข้อ 7 และขอบเขตข้อ 8 CropExpense ไม่มี profile เพราะ v0.28.0 ถอนออกจากการเป็น store แล้ว ไม่มีการเปลี่ยนแบบจำลอง
0.7.02026-07-30PROP-054 applied — spec v0.38.0. The capture family gains the authorship pair captured_by_membership_id? + capture_mode? (self | assisted | delegated) on planting · soil_adjustment · crop_outcome · yield_estimate · document, and capture_mode? alone on field_boundary (surveyed_by already names the actor). Write-once at insert, never edited, never inferred; stripped server-side on external reads. No new entity, key or index — see the Section 6 note. FR-339 · NFR-124 · A-71.apply PROP-054 — spec v0.38.0 ตระกูลการบันทึกได้คู่ฟิลด์ผู้บันทึก captured_by_membership_id? + capture_mode? บน planting · soil_adjustment · crop_outcome · yield_estimate · document และเฉพาะ capture_mode? บน field_boundary เขียนครั้งเดียว ไม่แก้ ไม่อนุมาน และตัดออกเมื่ออ่านจากภายนอก ไม่มี entity key หรือ index ใหม่ FR-339 · NFR-124 · A-71
0.8.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.8.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.8.22026-08-03Escape-sequence repair — spec v0.48.1 (patch). 210 literal backslash-u escape sequences decoded to the characters they stood for, so Thai in this document reads as Thai again instead of as a run of six ASCII characters. Found by check V-10 of tools/validate.html on its first run (NFR-143, PROP-076, spec v0.48.0) and carried as a dated OVERRIDE in SPEC-APP-PLT Rev 0.9.0; this row discharges that override for this document. Where an escape hid the section glyph, the text now reads Section N in English and ข้อ N in Thai, per project rule. No model change: not one requirement, entity, event, state or number moved.ซ่อมลำดับหลบหนี — spec v0.48.1 (patch) ถอดลำดับหลบหนีที่ยังเป็นตัวอักษร 210 จุด กลับเป็นอักขระที่มันแทน ภาษาไทยในเอกสารนี้จึงอ่านเป็นภาษาไทยอีกครั้ง ไม่ใช่ตัวอักษร ASCII หกตัวเรียงกัน พบโดยการตรวจ V-10 ของ tools/validate.html ในการรันครั้งแรก (NFR-143, PROP-076, spec v0.48.0) และถูกบันทึกเป็น OVERRIDE ที่มีวันที่ใน SPEC-APP-PLT Rev 0.9.0 แถวนี้ปลดการยกเว้นนั้นสำหรับเอกสารฉบับนี้ ที่ใดที่ escape ซ่อนสัญลักษณ์หัวข้อไว้ ข้อความอ่านเป็น Section N ในภาษาอังกฤษ และ ข้อ N ในภาษาไทย ตามกฎของโครงการ ไม่มีการเปลี่ยนแบบจำลอง: ไม่มี requirement เอนทิตี เหตุการณ์ สถานะ หรือตัวเลขใดขยับ