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.

StepTableResult
brokerage contractcontract, contract_parties, contract_personcontract, parties, persons
properties to brokercontract_propertycases, commission, offering folder, data room access
client registrationcontract_registration, contract_registration_advertheader and one row per advert, decision per row
offercontract_offerpurchase or lease offer
dealcontract_deal, contract_deal_paymentunderlying contract, payments; the other brokers' rows end
completion certificatecontract_certificatefee and VAT, received invoice
amendment, termination, annexcontract_event, contract_annexdocument, change of term
digital acceptancecontract_signaturesignature 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

  1. Base route access (access and modify on the route).
  2. Function permission before the model call; creating needs add, changing needs edit.
  3. 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.