SPEC-ERD-FIN Rev 0.5.1 · 2026-08-03

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

Data Model — Financial Institution Perspectivemodel ข้อมูล — มุมมองสถาบันการเงิน

Documentเอกสาร
SPEC-ERD-FIN
Versionversion (เวอร์ชัน)
0.5.1 · Draftฉบับร่าง
Updatedปรับปรุงล่าสุด
2026-08-03
Parentเอกสารแม่
SPEC-ERD
Perspectiveมุมมอง
Financial institution (ธนาคาร)สถาบันการเงิน (ธนาคาร)
Siblingsเอกสารพี่น้อง
SPEC-DDD-FIN · SPEC-PWF-FIN

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

This document reads the platform data model from the bank's side: the entities this perspective owns (its documents are the deep reference), the entities it shares — read only through a scoped, revocable ConsentGrant (PDPA, NFR-08) — and the contracts it holds with the four operating groups. Every definition here mirrors SPEC-ERD and graph/spec-graph.json — a perspective document adds actor-relevant reading, never divergent attributes. The bank never mutates the core: it reads it, scores it, lends against it, and is repaid from the delivery receivable at settlement.

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

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

Relationความเกี่ยวข้องEntitiesEntity
Ownsเป็นเจ้าของFinancialInstitution · ConsentGrant · CreditAssessment · LoanProduct · LoanApplication · LoanAccount · Collateral · LoanLedgerEntry
Shares (consent-gated)ใช้ร่วม (ต้องมีความยินยอม)Tenant · User · Farmer · Mill · Season · Quota · Crop · Field · Delivery · WeighTicket · QualityTest · YieldEstimate · FarmActivity · CreditLine · Repayment · PaymentItem · CanePriceAnnouncement
Contextsบริบทcredit_risk · lending
WorkflowsWorkflowWF-13 · WF-14 · WF-15 · WF-16 · WF-17

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..*11..*10..*10..*10..*10..*10..*10..*10..*0..10..110..110..*10..* Tenanttenant · FEDFinancialInstitutionสถาบันการเงินfi_id PKtenant_id FKnamefi_typelicense_nobot_code?provinceConsentGrantการให้ความยินยอมแบ่งปันข้อมูลconsent_id PKgrantor_tenant_id FKgrantee_tenant_id FKscopepurposegranted_atexpires_atstatusrevoked_at?LoanProductผลิตภัณฑ์สินเชื่อproduct_id PKfi_id FKproduct_typeborrower_capacitiescurrencyprincipal_minprincipal_maxinterest_rate_bpstenor_months+3 more…CreditAssessmentการประเมินเครดิตassessment_id PKfi_id FKapplication_id? FKsubject_tenant_id FKconsent_id FKscoregrademodel_verdata_window+3 more…LoanApplicationคำขอสินเชื่อapplication_id PKfi_id FKproduct_id FKapplicant_tenant_id FKseason_id? FKrequested_amtpurposeconsent_id FKassessment_id? FK+3 more…LoanAccountบัญชีสินเชื่อaccount_id PKfi_id FKapplication_id FKborrower_tenant_id FKprincipal_amtoutstanding_amtinterest_rate_bpsdisbursed_atmaturity_at+2 more…Collateralหลักประกันcollateral_id PKapplication_id? FKaccount_id? FKcollateral_typereference_id?valuation_amtvaluation_basisstatus
Fig. 1 — The bank’s owned plane — every read of the shared core passes a live ConsentGrant (PDPA, NFR-08); assessments freeze factors_snapshot + model_ver so decisions are reproducible (NFR-09).ภาพที่ 1 — ระนาบที่ธนาคารเป็นเจ้าของ — ทุกการอ่านแกนข้อมูลร่วมต้องผ่าน ConsentGrant ที่มีผล (PDPA, NFR-08); การประเมินตรึง factors_snapshot + model_ver ให้การตัดสินใจทำซ้ำได้ (NFR-09)
10..10..*10..*11..*0..10..*10..*0..10..* LoanAccountบัญชีสินเชื่อaccount_id PKfi_id FKapplication_id FKborrower_tenant_id FKprincipal_amtoutstanding_amtinterest_rate_bpsdisbursed_atmaturity_at+2 more…LoanLedgerEntryรายการบัญชีสินเชื่อentry_id PKaccount_id FKentry_typeamountpayment_item_id? FKvalue_dateposted_atnote?Collateralหลักประกันcollateral_id PKapplication_id? FKaccount_id? FKcollateral_typereference_id?valuation_amtvaluation_basisstatusPaymentItemรายการจ่ายต่อการส่งมอบ · MILLCreditLineวงเงินเกี๊ยว · CFQDeliveryการส่งมอบ · MILL
Fig. 2 — Repayment flows in from settlement PaymentItems; cane/quota/receivable collateral references shared entities by id; a supply-chain-finance LoanAccount may wholesale-fund a เงินเกี๊ยว CreditLine.ภาพที่ 2 — การชำระไหลเข้าจาก PaymentItem ของการปิดงวด; หลักประกันอ้อย/โควตา/ลูกหนี้อ้าง entity ร่วมด้วย id; LoanAccount แบบ supply chain finance อาจเป็นแหล่งทุนขายส่งให้ CreditLine เงินเกี๊ยว

4. Owned entities — the bank's reading4. Entity ที่เป็นเจ้าของ — การอ่านของธนาคาร

Entity · codeEntity · รหัสAttributesแอตทริบิวต์Rules that biteกฎที่มีผล
FinancialInstitution
FIN-###
fi_id, tenant_id, name, fi_type, license_no, bot_code?, provinceThe operating institution under our bank tenant (like Mill under a factory). fi_type: state_bank | commercial_bank | cooperative | fund | investor.สถาบันที่ดำเนินงานภายใต้ tenant bank ของเรา (เหมือน Mill ใต้ tenant โรงงาน) fi_type: state_bank | commercial_bank | cooperative | fund | investor
ConsentGrant
CNS-########
consent_id, grantor_tenant_type, grantor_tenant_id, grantee_fi_id, scope[], purpose, granted_at, expires_at, status, revoked_at?Our licence to read another tenant's data. scope ⊆ {delivery_history, ccs_quality, quota, credit_history, farm_activity, yield, contact, reliability_score}; status: active | expired | revoked. No shared-entity read resolves without an active grant covering the scope; revocation is append-only (NFR-08). v0.29.0 (PROP-037): reliability_score delivers the Reliability Extract and nothing else — score + band + formula_version + computed_at, a trailing-three-season summary and tenure; raw ReliabilityEvent rows, mill identities and delivery facts never resolve (FR-314, NFR-108).ใบอนุญาตของเราในการอ่านข้อมูลฝ่ายอื่น scope ⊆ {delivery_history, ccs_quality, quota, credit_history, farm_activity, yield, contact, reliability_score}; status: active | expired | revoked ไม่มีการอ่าน entity ที่ใช้ร่วมหากไม่มีความยินยอมที่ยังใช้อยู่ครอบคลุม scope; เพิกถอนแบบต่อท้าย (NFR-08) v0.29.0 (PROP-037): reliability_score ส่งมอบเฉพาะ Reliability Extract — คะแนน + ชั้น + เวอร์ชันสูตร + เวลาคำนวณ สรุปสามฤดูหลังสุด และความยาวประวัติ; แถวเหตุการณ์ดิบ ชื่อโรงงาน และรายละเอียดการส่งมอบไม่ resolve (FR-314, NFR-108)
CreditAssessment
CAS-########
assessment_id, fi_id, application_id?, subject_tenant_type, subject_tenant_id, consent_id, score, grade, model_ver, data_window, factors_snapshot, decision_reasons?, assessed_atThe cane-specific score. factors_snapshot freezes the exact features used so a decision is reproducible & explainable (NFR-09). Requires an active ConsentGrant; declines record decision_reasons.คะแนนเฉพาะอ้อย factors_snapshot ตรึงคุณลักษณะที่ใช้จริงให้ตัดสินใจทำซ้ำและอธิบายได้ (NFR-09) ต้องมี ConsentGrant ที่ active; การปฏิเสธบันทึก decision_reasons
LoanProduct
LNP-####
product_id, fi_id, product_type, borrower_kinds[], currency, principal_min, principal_max, interest_rate_bps, tenor_months, collateral_required, subsidy_note?, statusproduct_type: crop_input_loan | working_capital | equipment_term | quota_backed_line | supply_chain_finance. borrower_kinds ⊆ {cane_farmer, quota_farmer, sugar_factory}; subsidy_note records state schemes.product_type: crop_input_loan | working_capital | equipment_term | quota_backed_line | supply_chain_finance borrower_kinds ⊆ {cane_farmer, quota_farmer, sugar_factory}; subsidy_note บันทึกโครงการรัฐ
LoanApplication
LNA-########
application_id, fi_id, product_id, applicant_tenant_type, applicant_tenant_id, season_id?, requested_amt, purpose, consent_id, assessment_id?, status, decided_by?, submitted_atstatus: draft | submitted | scoring | underwriting | approved | rejected | withdrawn. Cannot enter scoring without a covering ConsentGrant; approved requires an assessment_id.status: draft | submitted | scoring | underwriting | approved | rejected | withdrawn เข้าสู่ scoring ไม่ได้ถ้าไม่มี ConsentGrant คุ้มครอง; approved ต้องมี assessment_id
LoanAccount
LNC-25##-######
account_id, fi_id, application_id, borrower_tenant_type, borrower_tenant_id, principal_amt, outstanding_amt, interest_rate_bps, disbursed_at, maturity_at, repay_source, statusstatus: current | delinquent | npl | restructured | closed | written_off — the loan state machine (SPEC-PWF-FIN Section 8). repay_source: cash | settlement_offset | wholesale_onlend. Formal & separate from เงินเกี๊ยว.status: current | delinquent | npl | restructured | closed | written_off — state machine สินเชื่อ (SPEC-PWF-FIN ข้อ 8) repay_source: cash | settlement_offset | wholesale_onlend เป็นทางการและแยกจากเงินเกี๊ยว
Collateral
COL-########
collateral_id, application_id?, account_id?, collateral_type, reference_id?, valuation_amt, valuation_basis, statuscollateral_type: standing_crop (→Crop) | quota (→Quota) | delivery_receivable (→future PaymentItem) | land (→Field) | contract (→CreditLine/CropTransfer) | clean. A delivery_receivable pledge enables settlement-offset repayment (registered lien ranks first).collateral_type: standing_crop (→Crop) | quota (→Quota) | delivery_receivable (→PaymentItem อนาคต) | land (→Field) | contract (→CreditLine/CropTransfer) | clean การจำนำ delivery_receivable ทำให้ชำระคืนแบบหักกลบตอนปิดงวดได้ (สิทธิที่จดแจ้งมาก่อน)
LoanLedgerEntry
LLE-########
entry_id, account_id, entry_type, amount, payment_item_id?, value_date, posted_at, note?Append-only ledger (NFR-05). entry_type: disbursement | repayment | interest_accrual | fee | write_off | adjustment. payment_item_id links a settlement-offset repayment; outstanding_amt on the account is the running balance.สมุดบัญชีแบบต่อท้าย (NFR-05) entry_type: disbursement | repayment | interest_accrual | fee | write_off | adjustment payment_item_id เชื่อมการชำระคืนแบบหักกลบ; outstanding_amt บนบัญชีคือยอดคงเหลือ

5. Shared entities — read only through consent5. Entity ที่ใช้ร่วม — อ่านได้เฉพาะผ่านความยินยอม

EntityEntityOwnerเจ้าของWhat the bank reads (scope)ธนาคารอ่านอะไร (scope)
Delivery · WeighTicket · QualityTestMILLMulti-season net tonnage, per-truck CCS & trash trend — the hard-to-fake production record behind the score (scope delivery_history, ccs_quality).ปริมาณสุทธิหลายฤดู แนวโน้ม CCS/สิ่งปนเปื้อนรายคันรถ — บันทึกการผลิตที่ปลอมยากเบื้องหลังคะแนน (scope delivery_history, ccs_quality)
QuotaMILL / CFQcommitted_t vs delivered_t — reliability against a commitment (scope quota).committed_t เทียบ delivered_t — ความน่าเชื่อถือต่อคำมั่น (scope quota)
CreditLine · RepaymentCFQOn-platform เงินเกี๊ยว repayment behaviour — the closest thing to a bureau score this population has (scope credit_history).พฤติกรรมชำระคืนเงินเกี๊ยวบน platform — สิ่งใกล้เคียงคะแนนบูโรที่สุดของกลุ่มนี้ (scope credit_history)
Crop · Field · YieldEstimate · FarmActivityCFCStanding crop, land, expected yield and financed-input application — forward cash-flow signal & collateral basis (scope yield, farm_activity).อ้อยยืนต้น ที่ดิน ประมาณการผลผลิต และการใช้ปัจจัยที่กู้ — สัญญาณกระแสเงินสดล่วงหน้าและฐานหลักประกัน (scope yield, farm_activity)
PaymentItemMILLThe future settlement stream a delivery_receivable pledges against; an assigned pledge routes part of the deduction to a LoanLedgerEntry(repayment).กระแสการปิดงวดในอนาคตที่ delivery_receivable จำนำไว้; การโอนสิทธิส่งส่วนหนึ่งของการหักไปเป็น LoanLedgerEntry(repayment)
Tenant · User · Farmer · Mill · Season · CanePriceAnnouncementplatform / GOVIdentity, season and price references — the frame every loan is booked in.ตัวตน ฤดู และราคาอ้างอิง — กรอบที่ทุกสินเชื่อถูกบันทึกอยู่

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

Normative physical model for the 8 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 ทั้ง 8 รายการที่ 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

FinancialInstitution สถาบันการเงิน mutable operational

table financial_institution  ·  aggregate FinancialInstitution  ·  code FIN-###  ·  unique (license_no)  ·  index (tenant_id)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
fi_iduuid—uuid_v7()PK
tenant_iduuid——FK → tenant
nametext——
fi_typetext (enum)——
license_notext——
bot_codetext✓—
provincesmallint——Province enum · TIS 1099-2548 (PROP-047)

ConsentGrant การให้ความยินยอมแบ่งปันข้อมูล immutable_after_state consent_gated

table consent_grant  ·  aggregate ConsentGrant  ·  code CNS-########  ·  index (grantor_tenant_id,status) · (grantee_tenant_id,scope,status) · (expires_at)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
consent_iduuid—uuid_v7()PK
grantor_tenant_iduuid——FK → tenant
grantee_tenant_iduuid——FK → tenant
scopetext (enum)——
purposetext——
granted_attimestamptz——
expires_attimestamptz——
statustext (enum)——
revoked_attimestamptz✓—

CreditAssessment การประเมินเครดิต append_only consent_gated

table credit_assessment  ·  aggregate CreditAssessment  ·  code CAS-########  ·  index (subject_tenant_id,assessed_at) · (fi_id) · (application_id)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
assessment_iduuid—uuid_v7()PK
fi_iduuid——FK → financial_institution
application_iduuid✓—FK → loan_application
subject_tenant_iduuid——FK → tenant
consent_iduuid——FK → consent_grant
scoreinteger——
gradetext (enum)——
model_vertext——
data_windowtext——
factors_snapshotjsonb——
decision_reasonsjsonb✓—
assessed_attimestamptz——

LoanProduct ผลิตภัณฑ์สินเชื่อ reference operational

table loan_product  ·  aggregate LoanProduct  ·  code LNP-####  ·  index (fi_id,status)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
product_iduuid—uuid_v7()PK
fi_iduuid——FK → financial_institution
product_typetext (enum)——
borrower_capacitiesjsonb——
currencychar(3)——
principal_minbigint (satang)——
principal_maxbigint (satang)——
interest_rate_bpsinteger (bps)——
tenor_monthsinteger——
collateral_requiredboolean——
subsidy_notetext✓—
statustext (enum)——

LoanApplication คำขอสินเชื่อ immutable_after_state operational

table loan_application  ·  aggregate LoanApplication  ·  code LNA-########  ·  index (fi_id,status) · (applicant_tenant_id) · (product_id)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
application_iduuid—uuid_v7()PK
fi_iduuid——FK → financial_institution
product_iduuid——FK → loan_product
applicant_tenant_iduuid——FK → tenant
season_iduuid✓—FK → season
requested_amtbigint (satang)——
purposetext——
consent_iduuid——FK → consent_grant
assessment_iduuid✓—FK → credit_assessment
statustext (enum)——
decided_byuuid✓—FK → membership
submitted_attimestamptz——

LoanAccount บัญชีสินเชื่อ mutable operational

table loan_account  ·  aggregate LoanAccount  ·  code LNC-25##-######  ·  unique (application_id)  ·  index (borrower_tenant_id,status) · (fi_id)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
account_iduuid—uuid_v7()PK
fi_iduuid——FK → financial_institution
application_iduuid——FK → loan_application
borrower_tenant_iduuid——FK → tenant
principal_amtbigint (satang)——
outstanding_amtbigint (satang)——
interest_rate_bpsinteger (bps)——
disbursed_attimestamptz——
maturity_attimestamptz——
repay_sourcetext (enum)——
statustext (enum)——

Collateral หลักประกัน mutable operational

table collateral  ·  aggregate LoanApplication  ·  code COL-########  ·  index (application_id) · (account_id) · (collateral_type,reference_id)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
collateral_iduuid—uuid_v7()PK
application_iduuid✓—FK → loan_application
account_iduuid✓—FK → loan_account
collateral_typetext (enum)——
reference_idtext✓—
valuation_amtbigint (satang)——
valuation_basistext——
statustext (enum)——

LoanLedgerEntry รายการบัญชีสินเชื่อ append_only operational

table loan_ledger_entry  ·  aggregate LoanAccount  ·  code LLE-########  ·  index (account_id,value_date) · (payment_item_id)

ColumnColumnTypeชนิดNullDefaultค่าตั้งต้นKey / refKey / อ้างอิง
entry_iduuid—uuid_v7()PK
account_iduuid——FK → loan_account
entry_typetext (enum)——
amountbigint (satang)——
payment_item_iduuid✓—FK → payment_item
value_datedate——
posted_attimestamptz——
notetext✓—

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
FinancialInstitutionfinancial_institutionfi_id(license_no)(tenant_id)mutableoperationalSection 6ข้อ 6
ConsentGrantconsent_grantconsent_id—(grantor_tenant_id,status) (grantee_tenant_id,scope,status) (expires_at)immutable_after_stateconsent_gatedSection 6ข้อ 6
CreditAssessmentcredit_assessmentassessment_id—(subject_tenant_id,assessed_at) (fi_id) (application_id)append_onlyconsent_gatedSection 6ข้อ 6
LoanProductloan_productproduct_id—(fi_id,status)referenceoperationalSection 6ข้อ 6
LoanApplicationloan_applicationapplication_id—(fi_id,status) (applicant_tenant_id) (product_id)immutable_after_stateoperationalSection 6ข้อ 6
LoanAccountloan_accountaccount_id(application_id)(borrower_tenant_id,status) (fi_id)mutableoperationalSection 6ข้อ 6
Collateralcollateralcollateral_id—(application_id) (account_id) (collateral_type,reference_id)mutableoperationalSection 6ข้อ 6
LoanLedgerEntryloan_ledger_entryentry_id—(account_id,value_date) (payment_item_id)append_onlyoperationalSection 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
ConsentGrantConsentGrantcredit_riskTerms frozen at grant; only status (active → expired/revoked) transitions. Every consent-gated read re-evaluates the grant in-request.เงื่อนไขตรึงตอนให้ความยินยอม; เปลี่ยนได้เฉพาะสถานะ (active → expired/revoked) การอ่านที่ต้องใช้ความยินยอมตรวจ grant ซ้ำทุกคำขอ
CreditAssessmentCreditAssessmentcredit_riskImmutable snapshot — factors_snapshot + model_ver make every decision reproducible (NFR-09).snapshot แก้ไขไม่ได้ — factors_snapshot + model_ver ทำให้ทุกการตัดสินใจทำซ้ำได้ (NFR-09)
LoanProductLoanProductlendingReference root — product terms version by row; live applications pin their product row.root อ้างอิง — เงื่อนไขผลิตภัณฑ์แยกตามแถว; ใบสมัครที่ค้างอยู่ตรึงแถวผลิตภัณฑ์ของตน
LoanApplicationLoanApplication · CollaterallendingDecision transitions freeze the application; application-stage collateral closes with the decision (loan state machine).การตัดสินใจตรึงใบสมัคร; หลักประกันชั้นใบสมัครปิดพร้อมการตัดสินใจ (state machine สินเชื่อ)
LoanAccountLoanAccount · LoanLedgerEntrylendingoutstanding_amt = principal − Σ repayment entries, updated in the same transaction as each appended entry.outstanding_amt = เงินต้น − Σ รายการชำระ ปรับใน transaction เดียวกับรายการที่ append
FinancialInstitutionFinancialInstitutionfederationRegistry root under a bank tenant.root ทะเบียนภายใต้ tenant ธนาคาร

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

10. Keys & conventions10. คีย์และข้อตกลง

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

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

RevฉบับDateวันที่Changesการเปลี่ยนแปลง
1.02026-07-07Initial version — PROP-003 (spec v4.0): financial-institution perspective of the lending & credit-risk data model (8 owned entities; consent-gated reads of the shared core)ฉบับแรก — PROP-003 (spec (สเปก) v4.0): มุมมองสถาบันการเงินต่อ model ข้อมูลสินเชื่อและความเสี่ยงเครดิต (entity ที่เป็นเจ้าของ 8 รายการ; อ่านแกนกลางที่ใช้ร่วมผ่านความยินยอม)
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
0.1.02026-07-11PROP-014 (spec v0.1.0): semantic versioning restarted at 0.1.0 (was Rev 1.1 · 2026-07-08); docnav updated for the gov_cluster split — GOV re-homed to docs/gov/ocsb/, new BOARD (กอน.) sibling added.PROP-014 (spec v0.1.0): รีสตาร์ท semantic versioning ที่ 0.1.0 (เดิม Rev 1.1 · 2026-07-08); ปรับ 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 8 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 อยู่ฉบับนี้ 8 รายการ (ข้อ 6), key / index / ชั้น mutability และ PDPA (ข้อ 7) และขอบเขตความสอดคล้องของ aggregate (ข้อ 8) ทั้งหมด render จาก block ใหม่ dataModeling ใน graph
0.3.02026-07-23PROP-047 (spec v0.19.0): FinancialInstitution.province re-typed text → smallint carrying the Province enum code (TIS 1099-2548); registry in the shared kernel, CHECK generated from the enum — no reference table / FK / seed.PROP-047 (spec v0.19.0): FinancialInstitution.province เปลี่ยนชนิดจาก text → smallint เก็บรหัส enum Province (มอก. 1099-2548); ทะเบียนอยู่ใน shared kernel, CHECK generate จาก enum — ไม่มีตารางอ้างอิง / FK / seed
0.4.02026-07-28PROP-037 applied (spec v0.29.0) — ConsentGrant scope gains reliability_score, the only route by which a reliability score reaches a lender; the value delivers the defined Reliability Extract (FR-314) and withholds raw events, mill identities and delivery facts (NFR-108). No new entity and no schema change beyond the enum.apply PROP-037 (spec v0.29.0) — scope ของ ConsentGrant เพิ่มค่า reliability_score ทางเดียวที่คะแนนไปถึงผู้ให้กู้ ส่งมอบ Reliability Extract ที่นิยามไว้ ไม่มี entity ใหม่
0.5.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.5.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