Files
ofbiz-framework/framework/example/entitydef/entitymodel.xml
T

152 lines
7.1 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
$Id: entitymodel.xml 7423 2006-04-26 22:36:00Z jonesde $
Copyright 2001-2006 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy of
the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
-->
<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/entitymodel.xsd">
<!-- ========================================================= -->
<!-- ======================== Defaults ======================= -->
<!-- ========================================================= -->
<title>Entity of an Open For Business Project Component</title>
<description>None</description>
<copyright>Copyright 2001-2006 The Apache Software Foundation</copyright>
<author>None</author>
<version>1.0</version>
<!-- ========================================================= -->
<!-- ======================== Data Model ===================== -->
<!-- The modules in this file are as follows: -->
<!-- - org.ofbiz.example.example -->
<!-- - org.ofbiz.example.feature -->
<!-- ========================================================= -->
<!-- ========================================================= -->
<!-- org.ofbiz.example.example -->
<!-- ========================================================= -->
<entity entity-name="Example"
package-name="org.ofbiz.example.example"
title="Example Entity">
<field name="exampleId" type="id-ne"><!-- primary sequenced ID --></field>
<field name="exampleTypeId" type="id-ne"></field>
<field name="statusId" type="id-ne"></field>
<field name="exampleName" type="name"></field>
<field name="description" type="description"></field>
<field name="longDescription" type="very-long"></field>
<field name="comments" type="comment"></field>
<field name="exampleSize" type="numeric"></field>
<field name="exampleDate" type="date-time"></field>
<prim-key field="exampleId"/>
<relation type="one" fk-name="EXMPL_TYP" rel-entity-name="ExampleType">
<key-map field-name="exampleTypeId"/>
</relation>
<relation type="one" fk-name="EXMPL_STTS" rel-entity-name="StatusItem">
<key-map field-name="statusId"/>
</relation>
</entity>
<entity entity-name="ExampleItem"
package-name="org.ofbiz.example.example"
title="Example Item Entity">
<field name="exampleId" type="id-ne"></field>
<field name="exampleItemSeqId" type="id-ne"><!-- secondary sequenced ID --></field>
<field name="description" type="description"></field>
<field name="amount" type="floating-point"></field>
<field name="amountUomId" type="id"></field>
<prim-key field="exampleId"/>
<prim-key field="exampleItemSeqId"/>
<relation type="one" fk-name="EXMPLIT_UOM" title="Amount" rel-entity-name="Uom">
<key-map field-name="amountUomId" rel-field-name="uomId"/>
</relation>
</entity>
<entity entity-name="ExampleStatus"
package-name="org.ofbiz.example.example"
title="Example Status Entity">
<field name="exampleId" type="id-ne"></field>
<field name="statusDate" type="date-time"></field>
<field name="statusId" type="id-ne"></field>
<prim-key field="exampleId"/>
<prim-key field="statusDate"/>
<relation type="one" fk-name="EXMPLST_EXMPL" rel-entity-name="Example">
<key-map field-name="exampleId"/>
</relation>
<relation type="one" fk-name="EXMPLST_STTS" rel-entity-name="StatusItem">
<key-map field-name="statusId"/>
</relation>
</entity>
<entity entity-name="ExampleType"
package-name="org.ofbiz.example.example"
title="Example Type Entity">
<field name="exampleTypeId" type="id-ne"></field>
<field name="parentTypeId" type="id"></field>
<field name="description" type="description"></field>
<prim-key field="exampleTypeId"/>
<relation type="one" fk-name="EXMPLTP_PAR" rel-entity-name="ExampleType">
<key-map field-name="parentTypeId" rel-field-name="exampleTypeId"/>
</relation>
</entity>
<!-- ========================================================= -->
<!-- org.ofbiz.example.feature -->
<!-- ========================================================= -->
<entity entity-name="ExampleFeature"
package-name="org.ofbiz.example.feature"
title="Example Feature Entity">
<field name="exampleFeatureId" type="id-ne"><!-- primary sequenced ID --></field>
<field name="featureSourceEnumId" type="id-ne"></field>
<field name="description" type="description"></field>
<prim-key field="exampleFeatureId"/>
<relation type="one" fk-name="EXFT_ENUM" rel-entity-name="Enumeration">
<key-map field-name="featureSourceEnumId" rel-field-name="enumId"/>
</relation>
</entity>
<entity entity-name="ExampleFeatureAppl"
package-name="org.ofbiz.example.feature"
title="Example Feature Application Entity">
<field name="exampleId" type="id-ne"></field>
<field name="exampleFeatureId" type="id-ne"></field>
<field name="fromDate" type="date-time"></field>
<field name="thruDate" type="date-time"></field>
<field name="exampleFeatureApplTypeId" type="id-ne"></field>
<field name="sequenceNum" type="numeric"></field>
<prim-key field="exampleId"/>
<prim-key field="exampleFeatureId"/>
<prim-key field="fromDate"/>
<relation type="one" fk-name="EXFTAP_EXPL" rel-entity-name="Example">
<key-map field-name="exampleId"/>
</relation>
<relation type="one" fk-name="EXFTAP_EXFT" rel-entity-name="ExampleFeature">
<key-map field-name="exampleFeatureId"/>
</relation>
<relation type="one" fk-name="EXFTAP_TYP" rel-entity-name="ExampleFeatureApplType">
<key-map field-name="exampleFeatureApplTypeId"/>
</relation>
</entity>
<entity entity-name="ExampleFeatureApplType"
package-name="org.ofbiz.example.feature"
title="Example Feature Application Type Entity">
<field name="exampleFeatureApplTypeId" type="id-ne"></field>
<field name="parentTypeId" type="id"></field>
<field name="description" type="description"></field>
<prim-key field="exampleFeatureApplTypeId"/>
<relation type="one" fk-name="EXFTAPTP_PAR" rel-entity-name="ExampleFeatureApplType">
<key-map field-name="parentTypeId" rel-field-name="exampleFeatureApplTypeId"/>
</relation>
</entity>
</entitymodel>