SalesRecord.hbm.xml 4.42 KB
Newer Older
焦凯 committed
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
<?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.SalesRecord" table="xyst_dinas_sales_record" 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>
        <property name="modifyTime" type="timestamp" not-null="false">
            <column name="modify_time"></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>
        <many-to-one name="pic" entity-name="com.beecode.bap.staff.datamodel.Staff" fetch="select">
			<column name="pic_id"  not-null="false"/>
		</many-to-one>
		<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>
王炜晨 committed
33
		<many-to-one name="regionalCompany" entity-name="com.xyst.dinas.biz.datamodel.xystOrganization" fetch="select">
焦凯 committed
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
            <column name="regional_company_id"  not-null="false"/>
        </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>
		<many-to-one name="purchaseSandCompany" entity-name="com.xyst.dinas.project.datamodel.PurchaseSandCompany" fetch="select">
            <column name="purchase_sand_company_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>
        <many-to-one name="productionLine" entity-name="com.xyst.dinas.biz.datamodel.ProductionLine" fetch="select">
            <column name="production_line_id"  not-null="false"/>
        </many-to-one>
        <many-to-one name="retailInfo" entity-name="com.xyst.dinas.biz.datamodel.RetailInfo" fetch="select">
            <column name="retail_info_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>
焦凯 committed
54 55 56
        <property name="customerType" type="nstring" not-null="false">
			<column name="customer_type" length="20"></column>
		</property>
焦凯 committed
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
		<property name="dealTime" type="timestamp" not-null="false">
            <column name="deal_time"></column>
        </property>
        <property name="syncTime" type="timestamp" not-null="false">
            <column name="sync_time"></column>
        </property>
        <property name="carInfo" type="nstring" not-null="false">
			<column name="car_info" length="20"></column>
		</property>
		<property name="dealAmount" type="big_decimal" not-null="false">
            <column name="deal_amount" precision="12" scale="4"></column>
        </property>
        <property name="price" type="big_decimal" not-null="false">
            <column name="price" precision="12" scale="2"></column>
        </property>
        <property name="amount" type="big_decimal" not-null="false">
            <column name="amount" precision="12" scale="2"></column>
        </property>
        <property name="paymentSource" type="nstring" not-null="false">
			<column name="payment_source" length="50"></column>
		</property>
		<property name="dealBillCode" type="nstring" not-null="false">
			<column name="deal_bill_code" length="50"></column>
		</property>
	</class>
</hibernate-mapping>