SalesPlan.hbm.xml 6.76 KB
Newer Older
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
<?xml version="1.0" encoding="UTF-8"?>
<hibernate-mapping xmlns="http://www.hibernate.org/xsd/hibernate-mapping"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.hibernate.org/xsd/hibernate-mapping
		http://www.hibernate.org/xsd/hibernate-mapping/hibernate-mapping-4.0.xsd">
	<class entity-name="com.xyst.dinas.sales.datamodel.SalesPlan" table="xyst_dinas_sale_plan" optimistic-lock="version">
		<tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/>
        <id name="id" type="uuid-binary" column="id" length="16">
            <generator class="uuid2" />
        </id>
        <version name="version" type="int" column="version"/>
        <property name="createTime" type="timestamp" not-null="false">
            <column name="create_time"></column>
        </property>
        <many-to-one name="creator" entity-name="com.beecode.bap.staff.datamodel.Staff" fetch="select">
            <column name="creator_id"  not-null="false"/>
        </many-to-one>
        <property name="modifyTime" type="timestamp" not-null="false">
            <column name="modify_time"></column>
        </property>
        <many-to-one name="modifier" entity-name="com.beecode.bap.staff.datamodel.Staff" fetch="select">
            <column name="modifier_id"  not-null="false"/>
        </many-to-one>
        <property name="billState" type="nstring" not-null="false">
            <column name="bill_state" length="100"></column>
        </property>
        <many-to-one name="bizProcess" entity-name="com.beecode.bap.workflow.datamodel.BizProcess" fetch="select">
            <column name="biz_process_id"  not-null="false"/>
        </many-to-one>
        <property name="billCode" type="nstring" not-null="false">
            <column name="bill_code" length="200"></column>
        </property>
        <property name="discard" type="boolean" not-null="false">
            <column name="discard"></column>
        </property>
        <property name="del" type="boolean" not-null="false">
            <column name="del"></column>
        </property>
        <property name="approveState" type="int" not-null="false">
            <column name="approve_state"></column>
        </property>
		<property name="approveTime" type="timestamp" not-null="false">
			<column name="approve_time"></column>
		</property>
		
王炜晨 committed
46
		<many-to-one name="regionalCompany" entity-name="com.xyst.dinas.biz.datamodel.xystOrganization" fetch="select">
47
            <column name="regional_company_id"  not-null="false"/>
48 49 50 51 52 53 54
        </many-to-one>
		<many-to-one name="planningCycle" entity-name="com.xyst.dinas.biz.datamodel.PlanningCycle" fetch="select">
            <column name="planning_cycle_id"  not-null="false"/>
        </many-to-one>
        <property name="approveMemo" type="nstring" not-null="false">
			<column name="approve_memo" length="400"></column>
		</property>
55 56 57 58 59 60 61 62 63 64
        <property name="requiredTotalAmount" type="big_decimal" not-null="false">
            <column name="required_total_amount" precision="12" scale="4"></column>
        </property>
        <property name="planTotalAmount" type="big_decimal" not-null="false">
            <column name="plan_total_amount" precision="12" scale="4"></column>
        </property>
        <property name="actualSaleTotalAmount" type="big_decimal" not-null="false">
            <column name="actual_sale_total_amount" precision="12" scale="4"></column>
        </property>
        		
65
		<bag name="SalesPlanDetails" lazy="true" fetch="select" inverse="true">
66
			<key column="master_id" not-null="true" />
王炜晨 committed
67
			<one-to-many entity-name="com.xyst.dinas.sales.datamodel.SalesPlanAssociatedSalesPlanDetail" />
68 69
		</bag>
	</class>
王炜晨 committed
70
	<class entity-name="com.xyst.dinas.sales.datamodel.SalesPlanAssociatedSalesPlanDetail" table="xyst_dinas_sale_plan_detail">
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
		<tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/>
        <id name="id" type="uuid-binary" column="id" length="16">
            <generator class="uuid2" />
        </id>
		<many-to-one name="master" entity-name="com.xyst.dinas.sales.datamodel.SalesPlan" fetch="select">
			<column name="master_id"  not-null="true"/>
		</many-to-one>
		
		<many-to-one name="contract" entity-name="com.xyst.dinas.contract.datamodel.Contract" fetch="select">
            <column name="contract_id"  not-null="false"/>
        </many-to-one>
		<property name="contractName" type="nstring" not-null="false">
			<column name="contract_name" length="100"></column>
		</property>
		<many-to-one name="project" entity-name="com.xyst.dinas.project.datamodel.ProjectFiled" fetch="select">
            <column name="project_id"  not-null="false"/>
        </many-to-one>
		<many-to-one name="purchaseSandUnit" entity-name="com.xyst.dinas.project.datamodel.PurchaseSandCompany" fetch="select">
            <column name="purchase_sand_unit_id"  not-null="false"/>
        </many-to-one>
        <many-to-one name="dinasType" entity-name="com.xyst.dinas.biz.datamodel.DinasType" fetch="select">
            <column name="dinas_type_id"  not-null="false"/>
        </many-to-one>
        <many-to-one name="station" entity-name="com.xyst.dinas.biz.datamodel.Station" fetch="select">
            <column name="station_id"  not-null="false"/>
        </many-to-one>
		<property name="stationName" type="nstring" not-null="false">
			<column name="station_name" length="100"></column>
		</property>
        <property name="requiredAmount" type="big_decimal" not-null="false">
            <column name="required_amount" precision="12" scale="4"></column>
        </property>
        <property name="contractAmount" type="big_decimal" not-null="false">
            <column name="contract_amount" precision="12" scale="4"></column>
        </property>
        <property name="stockAmount" type="big_decimal" not-null="false">
            <column name="stock_amount" precision="12" scale="4"></column>
        </property>
        <property name="planAmount" type="big_decimal" not-null="false">
            <column name="plan_amount" precision="12" scale="4"></column>
        </property>
        <property name="actualSaleAmount" type="big_decimal" not-null="false">
            <column name="actual_sale_amount" precision="12" scale="4"></column>
        </property>
115 116 117 118 119 120 121 122 123 124 125 126 127

		<property name="projectName" type="nstring" not-null="false">
			<column name="project_name" length="100"></column>
		</property>
		<property name="projectTypeName" type="nstring" not-null="false">
			<column name="project_type_name" length="100"></column>
		</property>
		<property name="purchaseSandUnitName" type="nstring" not-null="false">
			<column name="purchase_sand_unit_name" length="100"></column>
		</property>
		<property name="dinasTypeName" type="nstring" not-null="false">
			<column name="dinas_type_name" length="100"></column>
		</property>
128 129
	</class>
</hibernate-mapping>