Cane Agency · Change Proposal (ACCEPTED 07 Jul 2026 — applied graph-first to the spec series as v4.0)สถาบันอ้อย · ข้อเสนอการเปลี่ยนแปลง (อนุมัติ 7 ก.ค. 2569 — นำไปใช้แบบ graph ก่อนในชุด spec เป็น v4.0)
The platform already models informal season financing — เงินเกี๊ยว credit lines from a quota farmer or a mill (CreditLine · CreditItem · Repayment, context financing). A bank is a different animal. It is a regulated financial institution: it originates formal loan products, underwrites against a credit score, takes collateral, disburses on a schedule, classifies delinquency, and answers to the Bank of Thailand, the National Credit Bureau and the PDPA. Its business logic, its data-isolation and consent obligations, and its user roles do not fit inside the operations portal — hence a dedicated surface. What makes Cane Agency uniquely valuable to a lender is the evidence it already holds: multi-season delivery tonnage, per-truck CCS quality, quota fulfillment, contract-farming standing and on-platform repayment behaviour. Consented and scored, that evidence lets a bank lend to smallholders it otherwise treats as unbanked [F1].
platform model (โมเดล) การเงินรายฤดูแบบไม่เป็นทางการไว้แล้ว — วงเงินเงินเกี๊ยวจากหัวหน้าโควต้าหรือโรงงาน (CreditLine · CreditItem · Repayment บริบท financing) ธนาคารมีลักษณะแตกต่างออกไปโดยพื้นฐาน เป็นสถาบันการเงินที่ถูกกำกับ: ออกผลิตภัณฑ์สินเชื่อที่เป็นทางการ วิเคราะห์สินเชื่อจากคะแนนเครดิต รับหลักประกัน เบิกจ่ายตามตาราง จำแนกหนี้ค้าง และรับผิดชอบต่อธนาคารแห่งประเทศไทย เครดิตบูโร และ PDPA ตรรกะธุรกิจ ภาระการแยกข้อมูลและการขอความยินยอม และบทบาทผู้ใช้ของธนาคารไม่พอดีกับ portal ปฏิบัติการ จึงต้องมีช่องทางใช้งานเฉพาะทาง สิ่งที่ทำให้ Cane Agency มีค่าต่อผู้ให้กู้อย่างไม่เหมือนใครคือหลักฐานที่ platform ถืออยู่แล้ว: ปริมาณส่งมอบหลายฤดู ค่าความหวานรายคันรถ การทำโควตาสำเร็จ สถานะเกษตรพันธสัญญา และพฤติกรรมชำระคืนบน platform เมื่อได้รับความยินยอมและให้คะแนนแล้ว หลักฐานนี้ทำให้ธนาคารปล่อยกู้ให้เกษตรกรรายย่อยที่ปกติถือว่าเข้าไม่ถึงบริการธนาคารได้ [F1]
Formal agricultural credit is dominated by the state Bank for Agriculture and Agricultural Cooperatives (ธ.ก.ส. / BAAC), founded 1966; commercial banks lend mostly to large agribusiness, so smallholders often fall back on informal lenders at high rates [F1]. BAAC extends on the order of ฿500–600 billion in agricultural loans a year, ~70–80% of it for production inputs — fertilizer, seed, pesticide [F5] — the very เงินเกี๊ยว items the platform already itemizes. Cane sits inside targeted schemes: a Cabinet-backed harvester soft-loan (government-funded, BAAC-administered, under an MOU with สอน. and dozens of mills, ~5%/yr with the farmer bearing ~2%) [F3], and the “Half-Half Interest” working-capital scheme (to 2029, up to ฿100,000 at 6% with the state subsidizing half), for which loans must buy certified inputs and borrowers train on soil-analysis-based fertilizer use [F4]. The Cane and Sugar Fund (กองทุนอ้อยและน้ำตาลทราย) adds its own soft loans to growers and mills.
สินเชื่อเกษตรที่เป็นทางการถูกครองโดยธนาคารเพื่อการเกษตรและสหกรณ์การเกษตร (ธ.ก.ส.) ก่อตั้งปี 2509; ธนาคารพาณิชย์ปล่อยกู้ให้ธุรกิจเกษตรขนาดใหญ่เป็นหลัก เกษตรกรรายย่อยจึงมักหันไปพึ่งผู้ให้กู้นอกระบบที่ดอกเบี้ยสูง [F1] ธ.ก.ส. ปล่อยสินเชื่อเกษตรราว 500–600 พันล้านบาทต่อปี ประมาณ 70–80% เป็นปัจจัยการผลิต — ปุ๋ย เมล็ดพันธุ์ ยาปราบศัตรูพืช [F5] — คือรายการเงินเกี๊ยวที่ platform แจกแจงอยู่แล้ว อ้อยอยู่ในโครงการเฉพาะ: สินเชื่อดอกเบี้ยต่ำซื้อรถตัด (รัฐจัดสรร ธ.ก.ส. บริหาร ภายใต้ MOU กับ สอน. และโรงงานหลายสิบแห่ง ~5%/ปี เกษตรกรรับภาระ ~2%) [F3] และโครงการทุนหมุนเวียน “ครึ่งต่อครึ่ง” (ถึงปี 2572 วงเงินถึง 100,000 บาท ดอกเบี้ย 6% รัฐอุดหนุนครึ่งหนึ่ง) ซึ่งกำหนดให้เงินกู้ซื้อปัจจัยที่ได้รับรองและให้ผู้กู้อบรมการใช้ปุ๋ยตามผลวิเคราะห์ดิน [F4] กองทุนอ้อยและน้ำตาลทรายยังเพิ่มสินเชื่อดอกเบี้ยต่ำให้ชาวไร่และโรงงานอีกด้วย
Every cane grower contracts with a mill, and mills routinely supply cane varieties, mechanization services, fertilizer and financing as part of that contract [F2] — this is precisely the เงินเกี๊ยว relationship the platform models. A bank rarely wants to originate thousands of ฿20,000 input loans one farmer at a time. It wants to fund the aggregator: lend wholesale to the mill or the quota organization, which on-lends downstream (the platform's existing factory→quota-farmer→sub-farmer pass-through). The bank therefore reads the same delivery-and-repayment evidence to price a single large facility, while the last mile stays เงินเกี๊ยว. Both patterns — direct-to-grower and wholesale-to-aggregator — must be expressible.
ชาวไร่อ้อยทุกรายทำสัญญากับโรงงาน และโรงงานมักจัดหาพันธุ์อ้อย บริการเครื่องจักร ปุ๋ย และเงินทุนเป็นส่วนหนึ่งของสัญญานั้น [F2] — นี่คือความสัมพันธ์เงินเกี๊ยวที่ platform model ไว้พอดี ธนาคารมักไม่อยากออกสินเชื่อปัจจัยการผลิตหลักหมื่นบาททีละรายเป็นพันราย แต่อยากให้ทุนตัวรวบรวม: ปล่อยกู้ขายส่งให้โรงงานหรือองค์กรโควต้าที่ไปปล่อยต่อปลายน้ำ (การส่งผ่านโรงงาน→หัวหน้าโควต้า→ลูกไร่ที่ platform มีอยู่) ธนาคารจึงอ่านหลักฐานการส่งมอบและการชำระคืนชุดเดียวกันเพื่อตั้งราคาวงเงินก้อนใหญ่ก้อนเดียว ในขณะที่ไมล์สุดท้ายยังเป็นเงินเกี๊ยว ทั้งสองรูปแบบ — ตรงถึงชาวไร่ และขายส่งให้ตัวรวบรวม — ต้องแสดงได้
Smallholders are “thin-file” to a conventional lender — little collateral, no salary slip, sparse credit-bureau history. But the platform holds a rich, hard-to-fake operating record that maps directly onto repayment capacity:
A CreditAssessment freezes these features into an auditable snapshot and produces a score + grade — a cane-specific alternative-data score that lets a bank lend where a salary slip never existed.
CreditAssessment ตรึงคุณลักษณะเหล่านี้เป็น snapshot (สแนปช็อต) ที่ตรวจสอบได้และให้คะแนน + เกรด — คะแนนจากข้อมูลทางเลือกเฉพาะอ้อยที่ทำให้ธนาคารปล่อยกู้ในที่ที่ไม่เคยมีสลิปเงินเดือน
A financial institution is supervised by the Bank of Thailand, reports to the National Credit Bureau (เครดิตบูโร), and processes personal data only under the PDPA B.E. 2562 [F7, F8]. That imposes obligations the co-op operations portal was never built for: strict tenant/data isolation, consent-gated cross-party reads, KYC/AML, model governance and adverse-action explainability, retention and audit. Loan origination, underwriting, collections and NPL classification are a distinct workflow universe. Mixing them into the mill/quota portal would blur data boundaries and compliance scope. A separate finance surface keeps the regulated perimeter clean.
สถาบันการเงินอยู่ภายใต้การกำกับของธนาคารแห่งประเทศไทย รายงานต่อเครดิตบูโร และประมวลผลข้อมูลส่วนบุคคลภายใต้ พ.ร.บ. คุ้มครองข้อมูลส่วนบุคคล พ.ศ. 2562 (PDPA) เท่านั้น [F7, F8] สิ่งนี้สร้างภาระที่ portal ปฏิบัติการของสหกรณ์ไม่ได้ถูกออกแบบมารองรับ: การแยก tenant/ข้อมูลอย่างเข้มงวด การอ่านข้ามฝ่ายที่ต้องมีความยินยอม KYC/AML การกำกับ model และการอธิบายเหตุผลปฏิเสธ การเก็บรักษาและการตรวจสอบ การออกสินเชื่อ การวิเคราะห์ การเร่งรัดหนี้ และการจำแนก NPL เป็นจักรวาลเวิร์กโฟลว์ที่ต่างออกไป การผสมเข้าไปใน portal โรงงาน/โควต้าจะทำให้ขอบเขตข้อมูลและการกำกับพร่าเลือน ช่องทางใช้งานสินเชื่อแยกต่างหากช่วยรักษาเส้นรอบวงที่ถูกกำกับให้สะอาด
Add bank (ธนาคาร / Bank) as a fifth customer group, kind: tenant — a regulated lender with many federated users (credit analysts, loan officers, risk and compliance staff). It reuses the existing federation machinery (Tenant, User, FR-14): Tenant.tenant_type gains bank, exactly as sugar_factory, quota_org and government_agency do today.
เพิ่ม bank (ธนาคาร) เป็นกลุ่มลูกค้าที่ห้า kind: tenant — ผู้ให้กู้ที่ถูกกำกับซึ่งมีผู้ใช้แบบสหพันธ์จำนวนมาก (นักวิเคราะห์สินเชื่อ เจ้าหน้าที่สินเชื่อ เจ้าหน้าที่ความเสี่ยงและกำกับ) ใช้กลไกสหพันธ์เดิม (Tenant, User, FR-14): Tenant.tenant_type เพิ่มค่า bank เช่นเดียวกับ sugar_factory, quota_org และ government_agency ทุกวันนี้
Add a fifth surface finance — “Finance portal (ธนาคาร)”, desktop web ≥1280px, data-dense like the ops and regulator portals but on its own regulated perimeter. It joins website · portal · mobile · regulator in surfaces and SPEC-APP Section 2. Rationale in Section 2.4: compliance scope, tenant/data isolation and a distinct lending workflow universe.
เพิ่มช่องทางใช้งานที่ห้า finance — “portal สินเชื่อ (ธนาคาร)” เว็บเดสก์ท็อป ≥1280px ข้อมูลหนาแน่นเหมือน portal ปฏิบัติการและผู้กำกับ แต่อยู่บนเส้นรอบวงที่ถูกกำกับของตัวเอง เข้าร่วมกับ website · portal · mobile · regulator ใน surfaces และ SPEC-APP Section 2 เหตุผลใน ข้อ 2.4: ขอบเขตการกำกับ การแยก tenant/ข้อมูล และจักรวาลเวิร์กโฟลว์สินเชื่อที่ต่างออกไป
| Role · idบทบาท · id | Responsibilityหน้าที่ |
|---|---|
| relationship_officer เจ้าหน้าที่ลูกค้าสัมพันธ์สินเชื่อ | Originates applications, manages borrower relationships, requests consent.รับคำขอ ดูแลความสัมพันธ์ผู้กู้ ขอความยินยอม |
| credit_analyst นักวิเคราะห์สินเชื่อ | Reviews the CreditAssessment, underwrites, structures the facility & collateral.ทบทวน CreditAssessment วิเคราะห์ จัดโครงสร้างวงเงินและหลักประกัน |
| risk_officer เจ้าหน้าที่บริหารความเสี่ยง | Owns model governance, portfolio limits, delinquency & NPL classification.ดูแลการกำกับ model วงเงินพอร์ต หนี้ค้างและการจำแนก NPL |
| compliance_officer เจ้าหน้าที่กำกับการปฏิบัติงาน | KYC/AML, PDPA consent oversight, BoT/NCB regulatory reporting.KYC/AML กำกับความยินยอม PDPA รายงาน ธปท./เครดิตบูโร |
| fi_admin ผู้ดูแลระบบสถาบันการเงิน | Tenant user & product administration; role assignment.ดูแลผู้ใช้และผลิตภัณฑ์ของ tenant; กำหนดบทบาท |
All five map to groups: ["bank"], surfaces: ["finance"]. The mobile app gains no new role — borrowers see loan status through their existing cane-farmer / quota-farmer accounts.
ทั้งห้าบทบาทแมปกับ groups: ["bank"], surfaces: ["finance"] แอปมือถือไม่มีบทบาทใหม่ — ผู้กู้เห็นสถานะสินเชื่อผ่านบัญชีลูกไร่/หัวหน้าโควต้าเดิมของตน
Following PROP-002 Proposal A, the bank becomes the fifth perspective. Four new documents render its slice at full depth, and the graph perspectives block gains a bank node.
ตาม PROP-002 ข้อเสนอ A ธนาคารกลายเป็นมุมมองที่ห้า เอกสารใหม่ 4 ฉบับเรนเดอร์ส่วนของมันในความลึกเต็มที่ และบล็อก perspectives ใน graph เพิ่มโหนด bank
| Seriesชุด | New documentเอกสารใหม่ | Scopeขอบเขต |
|---|---|---|
| PRD | SPEC-PRD-FIN | Bank product goals, borrower segments, credit-score value prop, compliance scope, milestones.เป้าหมายผลิตภัณฑ์ธนาคาร กลุ่มผู้กู้ คุณค่าคะแนนเครดิต ขอบเขตการกำกับ หมุดหมาย |
| ERD | SPEC-ERD-FIN | Lending & credit-risk entities, consent, collateral, the read-slice of the shared core.Entity สินเชื่อและความเสี่ยง ความยินยอม หลักประกัน และส่วนอ่านของแกนกลางที่ใช้ร่วม |
| DDD | SPEC-DDD-FIN | credit_risk & lending contexts, aggregates, invariants, events produced/consumed.บริบท credit_risk และ lending แอกกริเกต กฎคงที่ เหตุการณ์ที่ผลิต/บริโภค |
| PWF | SPEC-PWF-FIN | WF-13…17: consent, scoring, origination, disbursement/repayment, collections; the loan state machine.WF-13…17: ความยินยอม การให้คะแนน การออกสินเชื่อ การเบิก/ชำระ การเร่งรัดหนี้; state machine สินเชื่อ |
// graph → perspectives.nodes[] gains:
{ "id": "bank",
"docs": ["SPEC-ERD-FIN", "SPEC-DDD-FIN", "SPEC-PWF-FIN"],
"owns": ["FinancialInstitution", "LoanProduct", "LoanApplication",
"CreditAssessment", "LoanAccount", "Collateral",
"LoanLedgerEntry", "ConsentGrant"],
"shares": ["Tenant", "User", "Farmer", "Mill", "Season", "Quota",
"Crop", "Field", "Delivery", "WeighTicket", "QualityTest",
"YieldEstimate", "FarmActivity", "CreditLine", "Repayment",
"PaymentItem"],
"contexts": ["credit_risk", "lending"],
"workflows": ["WF-13", "WF-14", "WF-15", "WF-16", "WF-17"] }
Authority holds: the eight new entities have exactly one owner (the bank); everything the bank reads to score is listed under shares — and every such read is consent-gated (Section 5.1). The union of all owns still equals the entity catalogue.
กฎอำนาจยังคงอยู่: entity ใหม่แปดตัวมีเจ้าของเดียว (ธนาคาร); ทุกอย่างที่ธนาคารอ่านเพื่อให้คะแนนถูกระบุใน shares — และทุกการอ่านต้องมีความยินยอม (ข้อ 5.1) ยูเนียนของ owns ทั้งหมดยังเท่ากับบัญชี entity
| Entity · codeEntity · รหัส | Attributesแอตทริบิวต์ | Rulesกฎ |
|---|---|---|
| ConsentGrant การให้ความยินยอมแบ่งปันข้อมูล CNS-######## |
consent_id, grantor_party_type, grantor_party_id, grantee_fi_id, scope[], purpose, granted_at, expires_at, status, revoked_at? | PDPA cornerstone [F7]. grantor_party_type: cane_farmer | quota_farmer | sugar_factory. scope is an explicit set — delivery_history | ccs_quality | quota | credit_history | farm_activity | yield | contact. status: active | expired | revoked. No bank read of a shared entity resolves without an active grant covering that scope (enforced, NFR-08). Append-only revocation.แกนหลัก PDPA [F7] grantor_party_type: cane_farmer | quota_farmer | sugar_factory scope เป็นชุดที่ระบุชัด — delivery_history | ccs_quality | quota | credit_history | farm_activity | yield | contact status: active | expired | revoked ธนาคารอ่าน entity ที่ใช้ร่วมไม่ได้หากไม่มีความยินยอมที่ยังใช้อยู่ครอบคลุม scope นั้น (บังคับใช้ NFR-08) การเพิกถอนเป็นแบบต่อท้าย |
| CreditAssessment การประเมินเครดิต CAS-######## |
assessment_id, fi_id, application_id?, subject_party_type, subject_party_id, consent_id, score, grade, model_ver, data_window, factors_snapshot, decision_reasons?, assessed_at | The cane-specific score. factors_snapshot freezes the exact features used — delivery tonnage & consistency, CCS/trash trend, quota fulfillment, on-platform repayment, yield estimate (Section 2.3) — so a decision is reproducible and explainable (NFR-09). grade e.g. A–E; decision_reasons carries adverse-action factors on a decline. Requires an active ConsentGrant.คะแนนเฉพาะอ้อย factors_snapshot ตรึงคุณลักษณะที่ใช้จริง — ปริมาณและความสม่ำเสมอการส่งมอบ แนวโน้ม CCS/สิ่งปนเปื้อน การทำโควตาสำเร็จ การชำระคืนบน platform ประมาณการผลผลิต (ข้อ 2.3) — ให้การตัดสินใจทำซ้ำและอธิบายได้ (NFR-09) grade เช่น A–E; decision_reasons เก็บเหตุผลปฏิเสธ ต้องมี ConsentGrant ที่ active |
| Entity · codeEntity · รหัส | Attributesแอตทริบิวต์ | Rulesกฎ |
|---|---|---|
| FinancialInstitution สถาบันการเงิน FIN-### |
fi_id, tenant_id, name, fi_type, license_no, bot_code?, province | The operating institution under a bank tenant — analogous to Mill under a sugar_factory tenant. fi_type: state_bank | commercial_bank | cooperative | fund | investor (covers ธ.ก.ส., commercial banks, the Cane & Sugar Fund, investors) [F1, F3].สถาบันที่ดำเนินงานภายใต้ tenant bank — เทียบได้กับ Mill ใต้ tenant โรงงาน fi_type: state_bank | commercial_bank | cooperative | fund | investor (ครอบคลุม ธ.ก.ส. ธนาคารพาณิชย์ กองทุนอ้อยฯ นักลงทุน) [F1, F3] |
| LoanProduct ผลิตภัณฑ์สินเชื่อ LNP-#### |
product_id, fi_id, product_type, borrower_kinds[], currency, principal_min, principal_max, interest_rate_bps, tenor_months, collateral_required, subsidy_note?, status | product_type: crop_input_loan | working_capital | equipment_term | quota_backed_line | supply_chain_finance. borrower_kinds ⊆ {cane_farmer, quota_farmer, sugar_factory}. interest_rate_bps in basis points; subsidy_note records state-subsidy schemes (e.g. Half-Half 6%, harvester ~5%) [F3, F4].product_type: crop_input_loan | working_capital | equipment_term | quota_backed_line | supply_chain_finance borrower_kinds ⊆ {cane_farmer, quota_farmer, sugar_factory} interest_rate_bps หน่วย basis point; subsidy_note บันทึกโครงการอุดหนุนของรัฐ (เช่น ครึ่งต่อครึ่ง 6%, รถตัด ~5%) [F3, F4] |
| LoanApplication คำขอสินเชื่อ LNA-######## |
application_id, fi_id, product_id, applicant_party_type, applicant_party_id, season_id?, requested_amt, purpose, consent_id, assessment_id?, status, decided_by?, submitted_at | status: draft | submitted | scoring | underwriting | approved | rejected | withdrawn. Cannot enter scoring without a covering ConsentGrant; approved requires an assessment_id. applicant_party_type polymorphic across the three borrower groups.status: draft | submitted | scoring | underwriting | approved | rejected | withdrawn เข้าสู่ scoring ไม่ได้ถ้าไม่มี ConsentGrant คุ้มครอง; approved ต้องมี assessment_id applicant_party_type เป็น polymorphic ครอบคลุมผู้กู้สามกลุ่ม |
| LoanAccount บัญชีสินเชื่อ LNC-25##-###### |
account_id, fi_id, application_id, borrower_party_type, borrower_party_id, principal_amt, outstanding_amt, interest_rate_bps, disbursed_at, maturity_at, repay_source, status | status: current | delinquent | npl | restructured | closed | written_off — the loan state machine (SPEC-PWF-FIN). repay_source: cash | settlement_offset | wholesale_onlend. Formal & separate from เงินเกี๊ยว CreditLine: a supply_chain_finance account to a mill/quota-org may be the funding source behind that party's CreditLine pass-through (Section 5.3).status: current | delinquent | npl | restructured | closed | written_off — state machine สินเชื่อ (SPEC-PWF-FIN) repay_source: cash | settlement_offset | wholesale_onlend เป็นทางการและแยกจาก CreditLine เงินเกี๊ยว: บัญชี supply_chain_finance ให้โรงงาน/องค์กรโควต้าอาจเป็นแหล่งทุนเบื้องหลังการส่งผ่าน CreditLine ของฝ่ายนั้น (ข้อ 5.3) |
| Collateral หลักประกัน COL-######## |
collateral_id, application_id?, account_id?, collateral_type, reference_id?, valuation_amt, valuation_basis, status | Cane-specific security. collateral_type: standing_crop (→Crop) | quota (→Quota) | delivery_receivable (→future PaymentItem) | land (→Field) | contract (→CreditLine/CropTransfer) | clean. A delivery_receivable pledge is what enables settlement-offset repayment (Section 5.3) — the strongest, lowest-risk instrument in this domain.หลักประกันเฉพาะอ้อย collateral_type: standing_crop (→Crop) | quota (→Quota) | delivery_receivable (→PaymentItem อนาคต) | land (→Field) | contract (→CreditLine/CropTransfer) | clean การจำนำ delivery_receivable คือสิ่งที่ทำให้ชำระคืนแบบหักกลบตอนปิดงวดได้ (ข้อ 5.3) — เครื่องมือที่แข็งแรงและเสี่ยงต่ำที่สุดในโดเมนนี้ |
| 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 repayment posted by settlement offset (mirrors เงินเกี๊ยว Repayment). outstanding_amt on the account is the running balance; corrections supersede, never edit.สมุดบัญชีแบบต่อท้าย (NFR-05) entry_type: disbursement | repayment | interest_accrual | fee | write_off | adjustment payment_item_id เชื่อมการชำระคืนที่โพสต์จากการหักกลบตอนปิดงวด (สะท้อน Repayment ของเงินเกี๊ยว) outstanding_amt บนบัญชีคือยอดคงเหลือ; การแก้ไขใช้การ supersede ไม่ใช่แก้ทับ |
| EntityEntity | Changeการเปลี่ยนแปลง |
|---|---|
| Tenant changed | tenant_type enum gains bank (alongside sugar_factory | quota_org | government_agency).tenant_type เพิ่มค่า bank (ควบคู่ sugar_factory | quota_org | government_agency) |
| PaymentItem changed | No new attribute. Its existing deductions gain a second offset target: a repayment against a LoanAccount when a delivery_receivable collateral is assigned — posting a LoanLedgerEntry(repayment) exactly as เงินเกี๊ยว posts a Repayment. Priority/ordering of offsets is an open question (Q4).ไม่มีแอตทริบิวต์ใหม่ deductions เดิมได้เป้าหมายหักกลบที่สอง: การชำระคืน LoanAccount เมื่อมีหลักประกัน delivery_receivable — โพสต์ LoanLedgerEntry(repayment) เช่นเดียวกับที่เงินเกี๊ยวโพสต์ Repayment ลำดับการหักกลบเป็นคำถามเปิด (Q4) |
| CreditLine unchanged | Deliberately not extended. Banks do NOT become a lender_party_type on เงินเกี๊ยว — that keeps the informal/formal boundary crisp. A bank funds the chain via a supply_chain_finance LoanAccount to the mill/quota-org, who runs its own CreditLine as today. An optional funding_account_id link on CreditLine is offered as Q5.จงใจไม่ขยาย ธนาคารไม่กลายเป็น lender_party_type บนเงินเกี๊ยว — เพื่อรักษาเส้นแบ่งไม่เป็นทางการ/ทางการให้ชัด ธนาคารให้ทุนห่วงโซ่ผ่าน LoanAccount แบบ supply_chain_finance ให้โรงงาน/องค์กรโควต้าที่ไปรัน CreditLine ของตนเองตามเดิม ลิงก์ funding_account_id บน CreditLine (ไม่บังคับ) เสนอเป็น Q5 |
| New eventเหตุการณ์ใหม่ | Producerผู้ผลิต | Consumersผู้บริโภค |
|---|---|---|
| ConsentGranted · ConsentRevoked | credit_risk | lending, finance, mobile, notifications |
| CreditAssessmentCompleted | credit_risk | lending, finance, reports |
| LoanApplicationSubmitted | lending | credit_risk, finance |
| LoanApproved · LoanRejected | lending | finance, mobile, notifications |
| LoanDisbursed | lending | settlement, mobile, reports |
| DeliveryReceivableAssigned | lending | settlement, portal |
| LoanRepaymentPosted | lending | finance, mobile, statements |
| LoanDelinquent · LoanRestructured · LoanWrittenOff | lending | finance, risk, reports |
PaymentPosted (existing) additionally triggers a LoanRepaymentPosted when the settled delivery carries an assigned receivable; the existing event keeps its contract.
PaymentPosted (เดิม) กระตุ้น LoanRepaymentPosted เพิ่มเมื่อการส่งมอบที่ปิดงวดมีการโอนสิทธิลูกหนี้; เหตุการณ์เดิมคงสัญญาเดิม
| ID | Workflowเวิร์กโฟลว์ | Perspectiveมุมมอง |
|---|---|---|
| WF-13 new | Data-sharing consent (PDPA) — a farmer/mill grants a bank scoped, time-boxed, revocable access; every cross-party read checks it.ความยินยอมแบ่งปันข้อมูล (PDPA) — ชาวไร่/โรงงานให้ธนาคารเข้าถึงแบบจำกัดขอบเขต มีอายุ และเพิกถอนได้; ทุกการอ่านข้ามฝ่ายตรวจสอบ | bank |
| WF-14 new | Cane credit scoring — assemble the consented feature snapshot, run the model, produce score + grade + reasons.การให้คะแนนเครดิตอ้อย — ประกอบ snapshot คุณลักษณะที่ได้รับความยินยอม รัน model ให้คะแนน + เกรด + เหตุผล | bank |
| WF-15 new | Loan origination — application → scoring → underwriting → collateral → decision → agreement.การออกสินเชื่อ — คำขอ → ให้คะแนน → วิเคราะห์ → หลักประกัน → ตัดสิน → ทำสัญญา | bank |
| WF-16 new | Disbursement & repayment — schedule, disburse, accrue, repay (cash or settlement-offset on an assigned receivable).การเบิกจ่ายและชำระคืน — จัดตาราง เบิก คิดดอกเบี้ย ชำระ (เงินสดหรือหักกลบตอนปิดงวดจากลูกหนี้ที่โอนสิทธิ) | bank |
| WF-17 new | Collections, delinquency & restructuring — arrears follow-up, restructure, write-off, NPL classification & reporting.การเร่งรัดหนี้ ค้างชำระ และปรับโครงสร้าง — ติดตามหนี้ค้าง ปรับโครงสร้าง ตัดหนี้สูญ จำแนกและรายงาน NPL | bank |
| WF-05 extend | Settlement additionally routes an assigned delivery_receivable deduction to a LoanAccount repayment (after เงินเกี๊ยว offsets per Q4 ordering).การปิดงวดส่งการหัก delivery_receivable ที่โอนสิทธิไปเป็นการชำระคืน LoanAccount (หลังการหักเงินเกี๊ยวตามลำดับ Q4) | sugar_factory |
New loan state machine (SPEC-PWF-FIN Section 8): applied → scored → underwriting → approved → disbursed → current → {delinquent ↔ current, restructured} → closed, with terminals rejected · closed · written_off. It parallels — never replaces — the delivery and crop machines.
State machine สินเชื่อใหม่ (SPEC-PWF-FIN Section 8): applied → scored → underwriting → approved → disbursed → current → {delinquent ↔ current, restructured} → closed สถานะสุดท้าย rejected · closed · written_off ทำงานคู่ขนาน — ไม่แทนที่ — state machine การส่งมอบและอ้อย
| ID | Requirementข้อกำหนด | Surfacesช่องทางใช้งาน | Priorityความสำคัญ |
|---|---|---|---|
| FR-34 | Financial-institution tenant provisioning + dedicated finance portal, strict tenant/data isolationการจัดตั้ง tenant สถาบันการเงิน + portal สินเชื่อเฉพาะ แยก tenant/ข้อมูลเข้มงวด | finance, website | P0 |
| FR-35 | Data-sharing consent (PDPA): scoped, time-boxed, revocable; enforced on every cross-party readความยินยอมแบ่งปันข้อมูล (PDPA): จำกัดขอบเขต มีอายุ เพิกถอนได้; บังคับใช้ทุกการอ่านข้ามฝ่าย | finance, mobile, portal | P0 |
| FR-36 | Cane credit score & assessment from platform data (delivery, CCS, quota, contract, repayment, yield); auditable snapshot & model versionคะแนนและการประเมินเครดิตอ้อยจากข้อมูล platform (ส่งมอบ CCS โควตา สัญญา ชำระคืน ผลผลิต); snapshot และ version (เวอร์ชัน) model ตรวจสอบได้ | finance | P0 |
| FR-37 | Loan product catalogue (crop input, working capital, equipment term, quota-backed, supply-chain finance)catalog (แคตตาล็อก) ผลิตภัณฑ์สินเชื่อ (ปัจจัยการผลิต ทุนหมุนเวียน เครื่องจักร วงเงินค้ำโควตา สินเชื่อห่วงโซ่) | finance | P1 |
| FR-38 | Loan application, scoring-assisted underwriting & approval workflowคำขอสินเชื่อ การวิเคราะห์ด้วยคะแนนช่วย และเวิร์กโฟลว์อนุมัติ | finance, mobile | P0 |
| FR-39 | Loan account & amortization ledger (append-only disbursement/repayment/interest/fee/write-off)บัญชีสินเชื่อและสมุดผ่อนชำระ (ต่อท้าย: เบิก/ชำระ/ดอกเบี้ย/ค่าธรรมเนียม/ตัดหนี้สูญ) | finance | P0 |
| FR-40 | Collateral management (standing crop, quota, delivery receivable, land, contract)การจัดการหลักประกัน (อ้อยยืนต้น โควตา ลูกหนี้การค้า ที่ดิน สัญญา) | finance | P1 |
| FR-41 | Disbursement & repayment incl. settlement-offset on assigned delivery receivablesการเบิกและชำระคืน รวมการหักกลบตอนปิดงวดจากลูกหนี้ที่โอนสิทธิ | finance, portal | P0 |
| FR-42 | Collections, delinquency, restructuring & NPL classificationการเร่งรัดหนี้ ค้างชำระ ปรับโครงสร้าง และจำแนก NPL | finance | P1 |
| FR-43 | Risk & portfolio dashboards; regulatory exports (BoT / NCB-aligned)dashboard (แดชบอร์ด) ความเสี่ยงและพอร์ต; รายงานส่งออกเชิงกำกับ (สอดคล้อง ธปท./เครดิตบูโร) | finance | P1 |
| ID | Non-functionalไม่ใช่หน้าที่ |
|---|---|
| NFR-08 | Consent-gated sharing: no bank read of another party's data without an active ConsentGrant covering the requested scope; every access logged and attributable.การแบ่งปันที่ต้องมีความยินยอม: ธนาคารอ่านข้อมูลฝ่ายอื่นไม่ได้หากไม่มี ConsentGrant ที่ยังใช้อยู่และครอบคลุม scope ที่ร้องขอ; บันทึกและระบุที่มาของทุกการเข้าถึง |
| NFR-09 | Credit-decision governance: every score carries model_ver + feature snapshot; decisions reproducible & explainable; adverse-action reasons recorded (aligns with fair-lending & BoT expectations).การกำกับการตัดสินใจสินเชื่อ: ทุกคะแนนมี model_ver + snapshot คุณลักษณะ; ตัดสินใจทำซ้ำและอธิบายได้; บันทึกเหตุผลปฏิเสธ (สอดคล้องหลักปล่อยกู้เป็นธรรมและความคาดหวังของ ธปท.) |
The bank is a fifth perspective, not a seventh master doc, so the top navbar keeps its six master codes (APP · PRD · ERD · DDD · PWF · UIX). The FIN family surfaces exactly where CFC/CFQ/MILL/GOV already do — the per-series .spec-docnav rows and the index. Concrete changes:
ธนาคารเป็นมุมมองที่ห้า ไม่ใช่เอกสารแม่บทฉบับที่เจ็ด แถบนำทางบนสุดจึงคงรหัสแม่บทหกตัวไว้ (APP · PRD · ERD · DDD · PWF · UIX) ตระกูล FIN ปรากฏตรงที่ CFC/CFQ/MILL/GOV ปรากฏอยู่แล้ว — แถว .spec-docnav รายชุดและดัชนี การเปลี่ยนแปลงที่ชัดเจน:
<nav class="spec-docnav" aria-label="PRD series">
<div class="spec-docnav__links">
<a class="is-current" href="spec-prd.html">Master</a>
<a href="spec-prd-cfq.html">CFQ · Quota Farmer</a>
<a href="spec-prd-cfc.html">CFC · Cane Farmer</a>
<a href="spec-prd-mill.html">MILL · Sugar Factory</a>
<a href="spec-prd-gov.html">GOV · OCSB</a>
<a href="spec-prd-fin.html">FIN · Bank</a> <!-- ← new -->
</div>
</nav>
สถาบันการเงิน (financial institution / bank) · ธ.ก.ส. (BAAC — Bank for Agriculture and Agricultural Cooperatives) · เครดิตบูโร (National Credit Bureau, NCB) · ธปท. (Bank of Thailand) · PDPA (Personal Data Protection Act B.E. 2562) · การให้ความยินยอม (consent grant) · คะแนนเครดิต (credit score / assessment) · หลักประกัน (collateral) · ลูกหนี้การค้า (delivery receivable) · การหักกลบตอนปิดงวด (settlement offset) · หนี้ไม่ก่อให้เกิดรายได้ (NPL) · สินเชื่อห่วงโซ่อุปทาน (supply-chain finance) · เงินกู้ครึ่งต่อครึ่ง (half-half interest scheme).
สถาบันการเงิน (financial institution / bank) · ธ.ก.ส. (ธนาคารเพื่อการเกษตรและสหกรณ์การเกษตร) · เครดิตบูโร (บริษัท ข้อมูลเครดิตแห่งชาติ, NCB) · ธปท. (ธนาคารแห่งประเทศไทย) · PDPA (พ.ร.บ. คุ้มครองข้อมูลส่วนบุคคล พ.ศ. 2562) · การให้ความยินยอม (consent grant) · คะแนนเครดิต (credit score) · หลักประกัน (collateral) · ลูกหนี้การค้า (delivery receivable) · การหักกลบตอนปิดงวด (settlement offset) · หนี้ไม่ก่อให้เกิดรายได้ (NPL) · สินเชื่อห่วงโซ่อุปทาน (supply-chain finance) · เงินกู้ครึ่งต่อครึ่ง (half-half interest scheme)
On acceptance this is a major revision: graph 3.0 → 4.0. Apply graph-first, then masters, then the four new FIN documents and navigation.
เมื่ออนุมัติจะเป็นการปรับรุ่นใหญ่: graph 3.0 → 4.0 นำไปใช้แบบ graph ก่อน ตามด้วยแม่บท แล้วจึงเอกสาร FIN ใหม่สี่ฉบับและการนำทาง
| Artifactเอกสาร | Changeการเปลี่ยนแปลง | Rev |
|---|---|---|
| spec-graph.json | +1 customerGroup, +1 surface, +5 roles, +2 contexts, +8 entities, ~16 relationships, +11 events, +5 workflows + loan state machine, FR-34…43, NFR-08/09, glossary, perspectives bank node, +4 documents — change FIRST+1 กลุ่มลูกค้า, +1 ช่องทางใช้งาน, +5 บทบาท, +2 บริบท, +8 entity, ~16 ความสัมพันธ์, +11 เหตุการณ์, +5 เวิร์กโฟลว์ + state machine สินเชื่อ, FR-34…43, NFR-08/09, อภิธาน, โหนด bank ใน perspectives, +4 documents — แก้ก่อนเสมอ | 3.0 → 4.0 |
| SPEC-APP | finance surface, 5 roles, FR-34…43, NFR-08/09; customer-group table gains the bankช่องทางใช้งาน finance, 5 บทบาท, FR-34…43, NFR-08/09; ตารางกลุ่มลูกค้าเพิ่มธนาคาร | 2.4 → 3.0 |
| SPEC-PRD + SPEC-PRD-FIN | Master gains the fifth group; new comprehensive bank PRDแม่บทเพิ่มกลุ่มที่ห้า; PRD ธนาคารฉบับใหม่ | 2.5 → 3.0 · — → 1.0 |
| SPEC-ERD + SPEC-ERD-FIN | Catalogue absorbs Section 5 entities; diagram + perspective map add the bank; new FIN data modelบัญชีรับ entity ข้อ 5; แผนภาพ + แผนที่มุมมองเพิ่มธนาคาร; model ข้อมูล FIN ใหม่ | 3.0 → 4.0 · — → 1.0 |
| SPEC-DDD + SPEC-DDD-FIN | credit_risk + lending contexts, events Section 6, glossary Section 10; new FIN domain docบริบท credit_risk + lending, เหตุการณ์ ข้อ 6, อภิธาน ข้อ 10; เอกสารโดเมน FIN ใหม่ | 3.0 → 4.0 · — → 1.0 |
| SPEC-PWF + SPEC-PWF-FIN | WF-13…17, WF-05 extension, loan state machine; new FIN workflow docWF-13…17, ส่วนขยาย WF-05, state machine สินเชื่อ; เอกสารเวิร์กโฟลว์ FIN ใหม่ | 3.0 → 4.0 · — → 1.0 |
| SPEC-UIX | Key screens: consent request, credit-score dossier, loan origination, portfolio & collections consoleหน้าจอหลัก: คำขอความยินยอม แฟ้มคะแนนเครดิต การออกสินเชื่อ console (คอนโซล) พอร์ตและเร่งรัดหนี้ | 2.4 → 3.0 |
| SPEC-INDEX + navigation + CLAUDE.md files | +4 index links, docnav FIN entries (Section 9), group count, folder context files+4 ลิงก์ดัชนี, รายการ FIN ใน docnav (ข้อ 9), จำนวนกลุ่ม, ไฟล์บริบทโฟลเดอร์ | — |
| # | Questionคำถาม | Proposed defaultค่าเริ่มต้นที่เสนอ |
|---|---|---|
| Q1 | Does the bank get a mobile presence, or is borrower-facing loan status shown inside the existing cane/quota mobile app?ธนาคารมีตัวตนบนมือถือไหม หรือสถานะสินเชื่อฝั่งผู้กู้แสดงในแอปลูกไร่/โควต้าเดิม? | Reuse the existing mobile app for borrowers; the finance surface is desktop-only. No new mobile role.ใช้แอปมือถือเดิมสำหรับผู้กู้; ช่องทางใช้งาน finance เป็นเดสก์ท็อปเท่านั้น ไม่มีบทบาทมือถือใหม่ |
| Q2 | Is the credit model built in-house on platform data, or does it call an external bureau / bank scorecard?model เครดิตสร้างภายในจากข้อมูล platform หรือเรียกสกอร์การ์ดของบูโร/ธนาคารภายนอก? | Platform-data score as the on-platform product; model_ver + snapshot make it swappable. External bureau is an adapter, deferred to the apps phase.คะแนนจากข้อมูล platform เป็นผลิตภัณฑ์บน platform; model_ver + snapshot ทำให้สลับได้ บูโรภายนอกเป็น adapter เลื่อนไปช่วงพัฒนาแอป |
| Q3 | Consent granularity — per bank, per scope, per season, or a standing grant?ความละเอียดความยินยอม — รายธนาคาร ราย scope รายฤดู หรือความยินยอมถาวร? | Per (grantor × bank × scope) with an expiry; revocable any time. A standing grant is just a far expiry.ราย (ผู้ให้ × ธนาคาร × scope) พร้อมวันหมดอายุ; เพิกถอนได้ทุกเมื่อ ความยินยอมถาวรคือวันหมดอายุที่ไกลออกไป |
| Q4 | Offset priority at settlement when both a เงินเกี๊ยว repayment and a bank receivable claim the same PaymentItem?ลำดับการหักกลบตอนปิดงวด เมื่อทั้งการชำระเงินเกี๊ยวและสิทธิลูกหนี้ธนาคารอ้างสิทธิ PaymentItem เดียวกัน? | Explicitly assigned receivable pledges rank first (registered lien), then เงินเกี๊ยว offsets, then net to the farmer — recorded in the PaymentItem deduction breakdown.การจำนำลูกหนี้ที่โอนสิทธิชัดเจนมาก่อน (สิทธิที่จดแจ้ง) ตามด้วยการหักเงินเกี๊ยว แล้วจึงจ่ายสุทธิให้ชาวไร่ — บันทึกในรายละเอียดการหักของ PaymentItem |
| Q5 | Wholesale funding — add funding_account_id to CreditLine, or keep the link as a report?การให้ทุนขายส่ง — เพิ่ม funding_account_id ใน CreditLine หรือเก็บลิงก์เป็นรายงาน? | Optional funding_account_id on CreditLine (nullable) so pass-through funding is traceable without changing เงินเกี๊ยว behaviour.เพิ่ม funding_account_id ใน CreditLine ( null ได้) ให้ตามรอยการให้ทุนส่งผ่านได้โดยไม่เปลี่ยนพฤติกรรมเงินเกี๊ยว |
| Q6 | Can a quota farmer or a mill acting as a lender also register as a bank tenant?หัวหน้าโควต้าหรือโรงงานที่เป็นผู้ให้กู้ จะลงทะเบียนเป็น tenant bank ด้วยได้ไหม? | No dual-typing. เงินเกี๊ยว lending stays under their own group; only licensed FIs are bank tenants.ไม่ให้เป็นสองประเภท การปล่อยเงินเกี๊ยวอยู่ใต้กลุ่มของตน; เฉพาะสถาบันการเงินที่มีใบอนุญาตเป็น tenant bank |
| Q7 | Does สอน. (regulator) see bank lending data, e.g. for industry credit oversight?สอน. (ผู้กำกับ) เห็นข้อมูลสินเชื่อธนาคารไหม เช่นเพื่อกำกับสินเชื่ออุตสาหกรรม? | Aggregate, anonymized portfolio reports only; no per-borrower loan detail crosses to the regulator without its own basis.เฉพาะรายงานพอร์ตแบบรวมและไม่ระบุตัวตน; รายละเอียดสินเชื่อรายผู้กู้ไม่ข้ามไปยังผู้กำกับหากไม่มีฐานอำนาจของตนเอง |
| Rev | Dateวันที่ | Changeการเปลี่ยนแปลง |
|---|---|---|
| 0.1 | 07 Jul 2026 | First draft for review — financial-institution (ธนาคาร) customer group, finance surface, 5 roles, credit_risk + lending contexts, 8 new entities, WF-13…17 + loan state machine, FR-34…43, NFR-08/09, navigation changes (ข้อ 9), industry evidence F1–F8. Suffix code FIN.ร่างแรกเพื่อพิจารณา — กลุ่มลูกค้าสถาบันการเงิน (ธนาคาร), ช่องทางใช้งาน finance, 5 บทบาท, บริบท credit_risk + lending, entity ใหม่ 8 รายการ, WF-13…17 + state machine สินเชื่อ, FR-34…43, NFR-08/09, การเปลี่ยนแปลงการนำทาง (ข้อ 9), หลักฐานอุตสาหกรรม F1–F8 รหัสต่อท้าย FIN |
| 1.0 | 13 Jul 2026 | Status record corrected: accepted 07 Jul 2026, applied graph-first as spec v4.0 with all Section 12 defaults adopted; delivered six FIN documents (APP/PRD/ERD/DDD/PWF/UIX). Notes added for later reshaping — PROP-005 (bank as a party capacity; grantee/borrower fields generalized), PROP-006 (invitation-only admission, FR-70/WF-28), FR-54 (machine collateral), PROP-014 (legacy v4.0 → semver line).ปรับบันทึกสถานะ: อนุมัติ 7 ก.ค. 2569 นำไปใช้แบบ graph ก่อนเป็น spec v4.0 โดยนำค่าเริ่มต้นข้อ 12 ไปใช้ทั้งหมด; ส่งมอบเอกสาร FIN หกฉบับ (APP/PRD/ERD/DDD/PWF/UIX) เพิ่มโนตการปรับโฉมภายหลัง — PROP-005 (ธนาคารเป็น capacity ของ party), PROP-006 (เข้าโดยการเชิญเท่านั้น FR-70/WF-28), FR-54 (หลักประกันเครื่องจักร), PROP-014 (v4.0 เดิม → สาย semver) |