core-jgi/db/ddlutils/model/C_ORDERLINE.xml

135 lines
10 KiB
XML

<?xml version="1.0"?>
<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database">
<database name="default" defaultIdMethod="none">
<table name="C_ORDERLINE">
<column name="C_ORDERLINE_ID" primaryKey="true" required="true" type="ID" size="10" autoIncrement="false"/>
<column name="AD_CLIENT_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
<column name="AD_ORG_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
<column name="ISACTIVE" primaryKey="false" required="true" type="CHAR" size="1" default="Y" autoIncrement="false"/>
<column name="CREATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" default="CURRENT_TIMESTAMP" autoIncrement="false"/>
<column name="CREATEDBY" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
<column name="UPDATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" default="CURRENT_TIMESTAMP" autoIncrement="false"/>
<column name="UPDATEDBY" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
<column name="C_ORDER_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
<column name="LINE" primaryKey="false" required="true" type="DECIMAL" size="10" autoIncrement="false"/>
<column name="C_BPARTNER_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
<column name="C_BPARTNER_LOCATION_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
<column name="DATEORDERED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false"/>
<column name="DATEPROMISED" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false"/>
<column name="DATEDELIVERED" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false"/>
<column name="DATEINVOICED" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false"/>
<column name="DESCRIPTION" primaryKey="false" required="false" type="VARCHAR" size="255" autoIncrement="false"/>
<column name="M_PRODUCT_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
<column name="M_WAREHOUSE_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
<column name="C_UOM_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
<column name="QTYORDERED" primaryKey="false" required="true" type="DECIMAL" default="0" autoIncrement="false"/>
<column name="QTYRESERVED" primaryKey="false" required="true" type="DECIMAL" default="0" autoIncrement="false"/>
<column name="QTYDELIVERED" primaryKey="false" required="true" type="DECIMAL" default="0" autoIncrement="false"/>
<column name="QTYINVOICED" primaryKey="false" required="true" type="DECIMAL" default="0" autoIncrement="false"/>
<column name="M_SHIPPER_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
<column name="C_CURRENCY_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
<column name="PRICELIST" primaryKey="false" required="true" type="DECIMAL" default="0" autoIncrement="false"/>
<column name="PRICEACTUAL" primaryKey="false" required="true" type="DECIMAL" default="0" autoIncrement="false"/>
<column name="PRICELIMIT" primaryKey="false" required="true" type="DECIMAL" default="0" autoIncrement="false"/>
<column name="LINENETAMT" primaryKey="false" required="true" type="DECIMAL" default="0" autoIncrement="false"/>
<column name="DISCOUNT" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false"/>
<column name="FREIGHTAMT" primaryKey="false" required="true" type="DECIMAL" default="0" autoIncrement="false"/>
<column name="C_CHARGE_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
<column name="C_TAX_ID" primaryKey="false" required="true" type="ID" size="10" autoIncrement="false"/>
<column name="S_RESOURCEASSIGNMENT_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
<column name="REF_ORDERLINE_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
<column name="M_ATTRIBUTESETINSTANCE_ID" primaryKey="false" required="false" type="ID" size="10" default="0" autoIncrement="false"/>
<column name="ISDESCRIPTION" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
<column name="PROCESSED" primaryKey="false" required="true" type="CHAR" size="1" default="N" autoIncrement="false"/>
<column name="QTYENTERED" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false"/>
<column name="PRICEENTERED" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false"/>
<column name="C_PROJECT_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
<column name="PRICECOST" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false"/>
<column name="QTYLOSTSALES" primaryKey="false" required="true" type="DECIMAL" default="0" autoIncrement="false"/>
<column name="C_PROJECTPHASE_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
<column name="C_PROJECTTASK_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
<column name="RRSTARTDATE" primaryKey="false" required="false" type="TIMESTAMP" size="7" autoIncrement="false"/>
<column name="RRAMT" primaryKey="false" required="false" type="DECIMAL" autoIncrement="false"/>
<column name="C_CAMPAIGN_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
<column name="C_ACTIVITY_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
<column name="USER1_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
<column name="USER2_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
<column name="AD_ORGTRX_ID" primaryKey="false" required="false" type="ID" size="10" autoIncrement="false"/>
<foreign-key foreignTable="AD_ORG" name="ADORGTRX_CORDERLINE">
<reference local="AD_ORGTRX_ID" foreign="AD_ORG_ID"/>
</foreign-key>
<foreign-key foreignTable="AD_ORG" name="ADORG_CORDERLINE">
<reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
</foreign-key>
<foreign-key foreignTable="C_ACTIVITY" name="CACTIVITY_CORDERLINE">
<reference local="C_ACTIVITY_ID" foreign="C_ACTIVITY_ID"/>
</foreign-key>
<foreign-key foreignTable="C_BPARTNER" name="CBPARTNER_SOLINE">
<reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
</foreign-key>
<foreign-key foreignTable="C_BPARTNER_LOCATION" name="CBPARTNERLOCATION_SOLINE">
<reference local="C_BPARTNER_LOCATION_ID" foreign="C_BPARTNER_LOCATION_ID"/>
</foreign-key>
<foreign-key foreignTable="C_CAMPAIGN" name="CCAMPAIGN_CORDERLINE">
<reference local="C_CAMPAIGN_ID" foreign="C_CAMPAIGN_ID"/>
</foreign-key>
<foreign-key foreignTable="C_CHARGE" name="CCHARGE_CORDERLINE">
<reference local="C_CHARGE_ID" foreign="C_CHARGE_ID"/>
</foreign-key>
<foreign-key foreignTable="C_CURRENCY" name="CCURRENCY_CORDERLINE">
<reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
</foreign-key>
<foreign-key foreignTable="C_ELEMENTVALUE" name="CELEMENRVALUEUSER1_CORDERLINE">
<reference local="USER1_ID" foreign="C_ELEMENTVALUE_ID"/>
</foreign-key>
<foreign-key foreignTable="C_ELEMENTVALUE" name="CELEMENRVALUEUSER2_CORDERLINE">
<reference local="USER2_ID" foreign="C_ELEMENTVALUE_ID"/>
</foreign-key>
<foreign-key foreignTable="C_ORDER" name="CORDER_CORDERLINE">
<reference local="C_ORDER_ID" foreign="C_ORDER_ID"/>
</foreign-key>
<foreign-key foreignTable="C_ORDERLINE" name="CORDERLINE_REF">
<reference local="REF_ORDERLINE_ID" foreign="C_ORDERLINE_ID"/>
</foreign-key>
<foreign-key foreignTable="C_PROJECT" name="CPROJECT_CORDERLINE">
<reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
</foreign-key>
<foreign-key foreignTable="C_PROJECTPHASE" name="CPROJECTPHASE_CORDERLINE">
<reference local="C_PROJECTPHASE_ID" foreign="C_PROJECTPHASE_ID"/>
</foreign-key>
<foreign-key foreignTable="C_PROJECTTASK" name="CPROJECTTASK_CORDERLINE">
<reference local="C_PROJECTTASK_ID" foreign="C_PROJECTTASK_ID"/>
</foreign-key>
<foreign-key foreignTable="C_TAX" name="CTAX_CORDERLINE">
<reference local="C_TAX_ID" foreign="C_TAX_ID"/>
</foreign-key>
<foreign-key foreignTable="C_UOM" name="CUOM_CORDERLINE">
<reference local="C_UOM_ID" foreign="C_UOM_ID"/>
</foreign-key>
<foreign-key foreignTable="M_ATTRIBUTESETINSTANCE" name="MATTRSETINST_CORDERLINE">
<reference local="M_ATTRIBUTESETINSTANCE_ID" foreign="M_ATTRIBUTESETINSTANCE_ID"/>
</foreign-key>
<foreign-key foreignTable="M_PRODUCT" name="MPRODUCT_CORDERLINE">
<reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
</foreign-key>
<foreign-key foreignTable="M_SHIPPER" name="MSHIPPER_CORDERLINE">
<reference local="M_SHIPPER_ID" foreign="M_SHIPPER_ID"/>
</foreign-key>
<foreign-key foreignTable="M_WAREHOUSE" name="MWAREHOUSE_CORDERLINE">
<reference local="M_WAREHOUSE_ID" foreign="M_WAREHOUSE_ID"/>
</foreign-key>
<foreign-key foreignTable="S_RESOURCEASSIGNMENT" name="SRESOURCEASSIGN_CORDERLINE">
<reference local="S_RESOURCEASSIGNMENT_ID" foreign="S_RESOURCEASSIGNMENT_ID"/>
</foreign-key>
<index name="C_ORDERLINE_ORDER">
<index-column name="C_ORDER_ID"/>
</index>
<index name="C_ORDERLINE_PRODUCT">
<index-column name="M_PRODUCT_ID"/>
</index>
<check>
<rule><![CDATA[IsActive in ('Y','N')]]></rule>
</check>
</table>
</database>