Contract.hbm.xml 8.73 KB
Newer Older
王衍超 committed
1 2 3 4 5 6 7 8
<?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.contract.datamodel.Contract" table="xyst_dinas_contract_master" 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">
9
            <generator class="uuid2" />
王衍超 committed
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
        </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="integer" not-null="false">
            <column name="approve_state"></column>
        </property>
        <property name="contractId" type="uuid-binary" not-null="false">
            <column name="contract_id" length="16"></column>
        </property>
45
		<many-to-one name="project" entity-name="com.xyst.dinas.project.datamodel.ProjectFiled" fetch="select">
王衍超 committed
46 47 48 49 50
            <column name="project_id"  not-null="false"/>
        </many-to-one>
		<property name="projectCode" type="nstring" not-null="false">
			<column name="project_code" length="50"></column>
		</property>
王炜晨 committed
51
		<many-to-one name="regionalCompany" entity-name="com.xyst.dinas.biz.datamodel.xystOrganization" fetch="select">
52
            <column name="regional_company_id"  not-null="false"/>
王衍超 committed
53
        </many-to-one>
54 55
		<property name="regionalCompanyName" type="nstring" not-null="false">
			<column name="regional_company_name" length="50"></column>
王衍超 committed
56
		</property>
焦凯 committed
57 58
		<many-to-one name="purchaseSandUnit" entity-name="com.xyst.dinas.project.datamodel.PurchaseSandCompany" fetch="select">
            <column name="purchase_sand_unit_id"  not-null="false"/>
王衍超 committed
59
        </many-to-one>
焦凯 committed
60 61
		<property name="purchaseSandUnitName" type="nstring" not-null="false">
			<column name="purchase_sand_unit_name" length="50"></column>
王衍超 committed
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
		</property>
		<property name="contractName" type="nstring" not-null="false">
			<column name="contract_name" length="50"></column>
		</property>
		<property name="contractCode" type="nstring" not-null="false">
			<column name="contract_code" length="50"></column>
		</property>
		<property name="contractState" type="nstring" not-null="false">
			<column name="contract_state" length="50"></column>
		</property>
		<property name="addrReceive" type="nstring" not-null="false">
			<column name="addr_receive" length="100"></column>
		</property>
	  	<property name="addrLongitude" type="big_decimal" not-null="false">
            <column name="addr_longitude" precision="10" scale="7"></column>
        </property>
	  	<property name="addrLatitude" type="big_decimal" not-null="false">
            <column name="addr_latitude" precision="10" scale="7"></column>
        </property>
		<property name="contacts" type="nstring" not-null="false">
			<column name="contacts" length="50"></column>
		</property>
		<property name="phoneNumber" type="nstring" not-null="false">
			<column name="phone_number" length="50"></column>
		</property>
		<property name="signDate" type="date" not-null="false">
			<column name="sign_date" length="50"></column>
		</property>
		<property name="startDate" type="date" not-null="false">
			<column name="start_date" length="50"></column>
		</property>
		<property name="endDate" type="date" not-null="false">
			<column name="end_date" length="50"></column>
		</property>
		<property name="payAccount" type="nstring" not-null="false">
			<column name="pay_account" length="100"></column>
		</property>
	  	<property name="deposit" type="big_decimal" not-null="false">
焦凯 committed
100
            <column name="deposit" precision="12" scale="2"></column>
王衍超 committed
101 102
        </property>
	  	<property name="amount" type="big_decimal" not-null="false">
焦凯 committed
103
            <column name="amount" precision="12" scale="2"></column>
焦凯 committed
104 105 106
        </property>
        <property name="dinasAmount" type="big_decimal" not-null="false">
            <column name="dinas_amount" precision="12" scale="4"></column>
王衍超 committed
107 108 109 110 111 112 113
        </property>
		<property name="carInfo" type="nstring" not-null="false">
			<column name="car_info" length="300"></column>
		</property>
		<property name="memo" type="nstring" not-null="false">
			<column name="memo" length="500"></column>
		</property>
焦凯 committed
114 115 116
		<property name="changeReason" type="nstring" not-null="false">
			<column name="change_reason" length="500"></column>
		</property>
王衍超 committed
117 118 119 120 121 122
		<property name="contractVersion" type="integer" not-null="false">
			<column name="contract_version" length="11"></column>
		</property>
		<property name="valid" type="boolean" not-null="false">
			<column name="valid" length="1"></column>
		</property>
123 124 125
		<property name="attId" type="uuid-binary" not-null="false" length="16">
			<column name="att_id" not-null="false"></column>
		</property>
焦凯 committed
126 127 128 129 130 131 132 133 134 135 136
		<property name="depositBalance" type="big_decimal" not-null="false">
            <column name="deposit_balance" precision="12" scale="2"></column>
        </property>
        <property name="advanceBalance" type="big_decimal" not-null="false">
            <column name="advance_balance" precision="12" scale="2"></column>
        </property>
        <property name="saleAmount" type="big_decimal" not-null="false">
            <column name="sale_amount" precision="12" scale="2"></column>
        </property>
        <property name="saleDinasAmount" type="big_decimal" not-null="false">
            <column name="sale_dinas_amount" precision="12" scale="2"></column>
137 138 139
        </property>
        <property name="detailAuto" type="boolean" not-null="false">
            <column name="detail_auto"></column>
焦凯 committed
140
        </property>
141 142
		<bag name="contractDetails" lazy="true" fetch="select" inverse="true">
			<key column="master_id" not-null="true" />
王炜晨 committed
143
			<one-to-many entity-name="com.xyst.dinas.contract.datamodel.ContractAssociatedcontractDetail" />
144
		</bag>
王衍超 committed
145
	</class>
王炜晨 committed
146
	<class entity-name="com.xyst.dinas.contract.datamodel.ContractAssociatedcontractDetail" table="xyst_dinas_contract_detail">
王衍超 committed
147 148
		<tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/>
        <id name="id" type="uuid-binary" column="id" length="16">
149
            <generator class="uuid2" />
王衍超 committed
150 151 152 153 154 155 156
        </id>
		<many-to-one name="master" entity-name="com.xyst.dinas.contract.datamodel.Contract" fetch="select">
			<column name="master_id"  not-null="false"/>
		</many-to-one>
        <property name="contractId" type="uuid-binary" not-null="false">
            <column name="contract_id" length="16"></column>
        </property>
157
        <many-to-one name="dinasType" entity-name="com.xyst.dinas.biz.datamodel.DinasType" fetch="select">
王衍超 committed
158 159 160
            <column name="dinas_type_id"  not-null="false"/>
        </many-to-one>
        <property name="purchaseAmount" type="big_decimal" not-null="false">
焦凯 committed
161
            <column name="purchase_amount" precision="12" scale="4"></column>
王衍超 committed
162
        </property>
焦凯 committed
163 164 165
        <property name="dinasAmount" type="big_decimal" not-null="false">
            <column name="dinas_amount" precision="12" scale="4"></column>
        </property>
王衍超 committed
166
        <property name="price" type="big_decimal" not-null="false">
焦凯 committed
167
            <column name="price" precision="12" scale="2"></column>
王衍超 committed
168 169
        </property>
        <property name="amount" type="big_decimal" not-null="false">
焦凯 committed
170
            <column name="amount" precision="12" scale="2"></column>
王衍超 committed
171 172 173
        </property>
	</class>
</hibernate-mapping>