Blame view
applications/product/entitydef/entitymodel_olap.xml
6.74 KB
c16038356
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
<?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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://ofbiz.apache.org/dtds/entitymodel.xsd"> <!-- ========================================================= --> <!-- ======================== Defaults ======================= --> <!-- ========================================================= --> <title>OLAP entities for the Product component</title> <description>None</description> <!-- ========================================================= --> <!-- Dimensions --> <!-- ========================================================= --> <entity entity-name="ProductDimension" package-name="org.ofbiz.bi.dimension.product" title="Product Dimension"> <description>Product dimension. The natural key is [productId]</description> <field name="dimensionId" type="id-ne"> <description>Unique identifier of the Product dimension record</description> </field> <field name="productId" type="id-ne"> <description>The natural key. From Product.productId</description> </field> <field name="productType" type="description"> <description>The product type. From ProductType.description</description> </field> <field name="brandName" type="name"></field> <field name="internalName" type="description"></field> <prim-key field="dimensionId"/> </entity> <!-- ========================================================= --> <!-- Inventory Item Facts and Star schema --> <!-- ========================================================= --> <entity entity-name="InventoryItemFact" package-name="org.ofbiz.bi.fact.product" title="Inventory Item Fact"> <description>A transaction fact entity with inventory item.</description> <field name="inventoryItemId" type="id-ne"></field> <field name="facilityId" type="id-ne"></field> <field name="productDimId" type="id-ne"></field> <field name="origCurrencyDimId" type="id-ne"></field> <field name="inventoryDateDimId" type="id-ne"></field> <field name="quantityOnHandTotal" type="fixed-point"></field> <field name="availableToPromiseTotal" type="fixed-point"></field> <field name="unitCost" type="fixed-point"></field> <field name="soldoutAmount" type="fixed-point"></field> <prim-key field="inventoryItemId"/> <relation type="one" fk-name="IIF_INVPRODUCT" rel-entity-name="ProductDimension"> <key-map field-name="productDimId" rel-field-name="dimensionId"/> </relation> <relation type="one" fk-name="IIF_INVCURRENCY" rel-entity-name="CurrencyDimension"> <key-map field-name="origCurrencyDimId" rel-field-name="dimensionId"/> </relation> <relation type="one" fk-name="IIF_INVDATE" rel-entity-name="DateDimension"> <key-map field-name="inventoryDateDimId" rel-field-name="dimensionId"/> </relation> </entity> <view-entity entity-name="InventoryItemSchema" package-name="org.ofbiz.bi.starschema.product" title="Inventory Item Schema"> <description>"Inventory Item Schema.</description> <member-entity entity-alias="IIF" entity-name="InventoryItemFact"/> <!--member-entity entity-alias="SIIF" entity-name="SalesOrderItemFact"/--> <member-entity entity-alias="PD" entity-name="ProductDimension"/> <member-entity entity-alias="IDD" entity-name="DateDimension"/> <member-entity entity-alias="CD" entity-name="CurrencyDimension"/> <alias-all entity-alias="IIF" function="sum"> <exclude field="inventoryItemId"/> <exclude field="orderId"/> <exclude field="facilityId"/> <exclude field="inventoryDateDimId"/> <exclude field="productDimId"/> <exclude field="origCurrencyDimId"/> </alias-all> <!--alias-all entity-alias="SIIF" function="sum"> <exclude field="orderItemSeqId"/> <exclude field="orderDateDimId"/> <exclude field="productDimId"/> <exclude field="billToCustomerDimId"/> <exclude field="origCurrencyDimId"/> <exclude field="orderId"/> <exclude field="orderItemSeqId"/> <exclude field="orderStatus"/> <exclude field="saleChanel"/> </alias-all--> <alias-all entity-alias="PD" prefix="product" group-by="true"> <exclude field="dimensionId"/> </alias-all> <alias-all entity-alias="IDD" prefix="inventoryDate" group-by="true"> <exclude field="dimensionId"/> </alias-all> <alias-all entity-alias="CD" prefix="currency" group-by="true"> <exclude field="dimensionId"/> </alias-all> <alias entity-alias="IIF" name="inventoryItemId" group-by="true"> <description>Inventory Item Id</description> </alias> <alias entity-alias="IIF" name="facilityId" group-by="true"> <description>Facility Id</description> </alias> <alias entity-alias="PD" name="productId" group-by="true"> <description>Product id</description> </alias> <view-link entity-alias="IIF" rel-entity-alias="PD" rel-optional="true"> <key-map field-name="productDimId" rel-field-name="dimensionId"/> </view-link> <!--view-link entity-alias="PD" rel-entity-alias="SIIF" rel-optional="true"> <key-map field-name="dimensionId" rel-field-name="productDimId"/> </view-link--> <view-link entity-alias="IIF" rel-entity-alias="IDD"> <key-map field-name="inventoryDateDimId" rel-field-name="dimensionId"/> </view-link> <view-link entity-alias="IIF" rel-entity-alias="CD"> <key-map field-name="origCurrencyDimId" rel-field-name="dimensionId"/> </view-link> </view-entity> </entitymodel> |