Database Table: CONTRACT

Each row of this table represents a Contract. A Contract is part of a Store, and represents terms and conditions that may be associated with OrderItems, such as prices, minimum quantities, and who can use the Contract.

Column Name Column Type Column Description
COMMENTS VARCHAR (4000)
NULL
A comment associated with the Contract.
CONTRACT_ID BIGINT
NOT NULL
Unique identifier for a contract. Foreign key to TRADING_ID in the TRADING database table.
MAJORVERSION INTEGER
NOT NULL, DEFAULT 1
Major version number of the Contract.
MARKFORDELETE INTEGER
NOT NULL, DEFAULT 0
Indicates if this Contract has been marked for deletion:
0 = No
1 = Yes and this Contract has been marked for deletion
MEMBER_ID BIGINT
NOT NULL
Owner of the Contract.
MINORVERSION INTEGER
NOT NULL, DEFAULT 0
Minor version number of the Contract.
NAME VARCHAR (200)
NOT NULL
Uniquely identifies a version of a Contract of a particular origin for a particular owner.
ORIGIN INTEGER
NOT NULL, DEFAULT 0
Indicates why the Contract was created:
0 = manual
1 = imported
2 = RFQ
3 = exchange
4 = auction
5 = 2-party negotiation
6 = deployment
STATE INTEGER
NOT NULL, DEFAULT 0
Indicates the contract state:
0 = draft
1 = pending approval
2 = approved
3 = active
4 = rejected
5 = canceled
6 = closed
7 = suspended
-1 = deployment in progress
-2 = deployment failed
TIMEACTIVATED TIMESTAMP
NULL
The time the Contract was activated.
TIMEAPPROVED TIMESTAMP
NULL
The time the Contract was approved.
TIMECREATED TIMESTAMP
NULL
The time the Contract was created.
TIMEDEPLOYED TIMESTAMP
NULL
The time the Contract was deployed.
TIMEUPDATED TIMESTAMP
NULL
The time the Contract was most recently updated.
USAGE INTEGER
NOT NULL, DEFAULT 0
Indicates how the contract will be used:
0 = default
1 = organization buyer
2 = reseller
3 = special bid
4 = referral
5 = supplier
Indexes:
Index Name Indexed Column Names Index Type
I0000078 NAME, MEMBER_ID, MAJORVERSION, MINORVERSION, ORIGIN Unique Index
SQL030416034912060 CONTRACT_ID Primary Key
Constraints:
Constraint Name Column Names Foreign Table Name Foreign Column Names Constraint Type
F_252 CONTRACT_ID TRADING TRADING_ID Cascade
F_253 MEMBER_ID MEMBER MEMBER_ID Cascade

Referenced By:
Constraint Name Referenced Column Name Foreign Table Name Foreign Column Names Constraint Type
F_139 CONTRACT_ID BUYSUPMAP CONTRACT_ID Cascade
F_188 CONTRACT_ID CATCNTR CONTRACT_ID Cascade
F_246 CONTRACT_ID CNTRDISPLY CONTRACT_ID Cascade
F_785 CONTRACT_ID STORECNTR CONTRACT_ID Cascade
F_788 CONTRACT_ID STOREDEF CONTRACT_ID Cascade
F_833 CONTRACT_ID TDPSCNCNTR CONTRACT_ID Cascade
F_912 CONTRACT_ID CNTRSTORE CONTRACT_ID Cascade
F_925 CONTRACT_ID STORE CRTDBYCNTR_ID Cascade