Contract¶
This document provides the API references for the contracts in the database.
API¶
-
class
models.
Contract
¶ A contract is a relationship between entities enrolled in the database. Each contract has a set of contractors (who paid), and contracted (who were paid), and relevant information about the contract.
All the fields of this model are retrieved from Base. Except for
base_id
andadded_date
, all entries can be null if they don’t exist in Base. They are:-
description
¶ The description of the contract.
-
price
¶ The price of the contract, in cents (to be an integer).
-
signing_date
¶ The date it was signed.
-
close_date
¶ The date is was closed. It is normally null.
-
base_id
¶ The primary key of the contract on the Base database. It is “unique” and can used to create the link to Base (see
get_base_url()
)
-
contract_type
¶ A Foreign key to one of the types of contracts.
-
procedure_type
¶ A Foreign key to one of the types of procedures.
-
contract_description
¶ A text about the object of the contract (i.e. what was bought or sold).
-
country
¶
-
district
¶
-
council
¶ Country, district, council.
This model has a getter:
-