Structure and data flow of the contract module
Concepts of the contract module, the steps and tables of the brokerage workflow, the owner models and the verification status.
The contract module manages contracts, the real estate brokerage workflow, document generation and digital acceptance; the data room gives access to the broker and the interested party.
Overview
The owner of a contract is the client (contract.company_client_id); every content permission filters on it. The direction (direction) decides the client's side: customer means the seller side (number V-YYYY-NNNN), supplier the buyer side (number SZ-YYYY-NNNN).
Process and tables
Table names carry the installation's own prefix in the database.
| Step | Table | Result |
|---|---|---|
| brokerage contract | contract, contract_parties, contract_person | contract, parties, persons |
| properties to broker | contract_property | cases, commission, offering folder, data room access |
| client registration | contract_registration, contract_registration_advert | header and one row per advert, decision per row |
| offer | contract_offer | purchase or lease offer |
| deal | contract_deal, contract_deal_payment | underlying contract, payments; the other brokers' rows end |
| completion certificate | contract_certificate | fee and VAT, received invoice |
| amendment, termination, annex | contract_event, contract_annex | document, change of term |
| digital acceptance | contract_signature | signature and evidence |
Owner models
The only writer of every contract table is the admin contract/contract model; on the catalog side thin adapters exist (contract/brokerage for the data room, contract/esign for the signing page, contract/expiry for the expiry notice, contract/passthrough). Templates, reasons, rejection grounds and activities have their own models. Database-level foreign keys exist only on the document and share tables; all other relations are logical.
Permissions
- Base route access (access and modify on the route).
- Function permission before the model call; creating needs
add, changing needsedit. - Content scope: the contract filters on
company_client_id; templates, reasons, rejection grounds and activities are shared master data without content filtering.
Known limitations
The behaviour is verified from code and from tests on a real MariaDB; it has not run in a live data room, with real e-mail sending, real Drive storage or production scheduling. The contract template, contract action, data room timeline and property advert modules are marked "In development" in the menu.