ProjectFiled.hbm.xml 6.14 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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
<?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.project.datamodel.ProjectFiled" table="xyst_dinas_project_filed" 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="assigned" />
		</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="projectName" type="nstring" not-null="false">
			<column name="project_name" length="100"></column>
		</property>
		<many-to-one name="projectType" entity-name="com.xyst.dinas.project.dict.datamodel.ProjectType" fetch="select">
			<column name="project_type" not-null="false"></column>
		</many-to-one>
王炜晨 committed
48
		<many-to-one name="regionalCompany" entity-name="com.xyst.dinas.biz.datamodel.xystOrganization" fetch="select">
49 50
			<column name="regional_company" not-null="false"></column>
		</many-to-one>
杨清松 committed
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
		<property name="projectNum" type="nstring" not-null="false">
			<column name="project_num" length="100"></column>
		</property>
		<property name="projectLocation" type="nstring" not-null="false">
			<column name="project_location" length="100"></column>
		</property>
		<property name="useSandComany" type="nstring" not-null="false">
			<column name="use_sand_comany" length="100"></column>
		</property>
		<property name="projectGeneralContractor" type="nstring" not-null="false">
			<column name="project_general_contractor" length="100"></column>
		</property>
		<property name="contacts" type="nstring" not-null="false">
			<column name="contacts" length="100"></column>
		</property>
		<property name="contactNumber" type="nstring" not-null="false">
			<column name="contact_number" length="100"></column>
		</property>
		<property name="remark" type="nstring" not-null="false">
			<column name="remark" length="3000"></column>
		</property>
72 73 74 75 76 77 78 79 80 81 82 83
		<property name="projectCoordinate" type="nstring" not-null="false">
			<column name="project_coordinate" length="255"></column>
		</property>
		<property name="province" type="nstring" not-null="false">
			<column name="province" length="100"></column>
		</property>
		<property name="city" type="nstring" not-null="false">
			<column name="city" length="100"></column>
		</property>
		<property name="district" type="nstring" not-null="false">
			<column name="district" length="100"></column>
		</property>
杨清松 committed
84 85
		<bag name="ProjectFiledDinasDetails" lazy="true" fetch="select" inverse="true">
			<key column="master_id" not-null="true" />
王炜晨 committed
86
			<one-to-many entity-name="com.xyst.dinas.project.datamodel.ProjectFiledAssociatedProjectFiledDinasDetail" />
杨清松 committed
87 88 89
		</bag>
		<bag name="ProjectSubContractorDetails" lazy="true" fetch="select" inverse="true">
			<key column="master_id" not-null="true" />
王炜晨 committed
90
			<one-to-many entity-name="com.xyst.dinas.project.datamodel.ProjectFiledAssociatedProjectSubContractorDetail" />
杨清松 committed
91 92
		</bag>
	</class>
王炜晨 committed
93
	<class entity-name="com.xyst.dinas.project.datamodel.ProjectFiledAssociatedProjectFiledDinasDetail" table="xyst_dinas_project_filed_dinas_detail">
杨清松 committed
94 95 96 97 98 99 100 101 102 103 104 105 106 107
		<tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/>
		<id name="id" type="uuid-binary" column="id" length="16">
			<generator class="assigned" />
		</id>
		<many-to-one name="dinasType" entity-name="com.xyst.dinas.biz.datamodel.DinasType" fetch="select">
			<column name="dinas_type" not-null="false"></column>
		</many-to-one>
        <property name="weight" type="big_decimal" not-null="false">
			<column name="weight" precision="12" scale="2"></column>
		</property>
		<many-to-one name="master" entity-name="com.xyst.dinas.project.datamodel.ProjectFiled" fetch="select">
			<column name="master_id"  not-null="false"/>
		</many-to-one>
	</class>
王炜晨 committed
108
	<class entity-name="com.xyst.dinas.project.datamodel.ProjectFiledAssociatedProjectSubContractorDetail" table="xyst_dinas_project_sub_contractor_detail">
杨清松 committed
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
		<tuplizer entity-mode="dynamic-map" class="com.beecode.bcp.store.hibernate.KObjectEntityTuplizer"/>
		<id name="id" type="uuid-binary" column="id" length="16">
			<generator class="assigned" />
		</id>
		<many-to-one name="subContractorType" entity-name="com.xyst.dinas.project.dict.datamodel.SubContractorType" fetch="select">
			<column name="sub_contractor_type" not-null="false"></column>
		</many-to-one>
		<property name="subContractorName" type="nstring" not-null="false">
			<column name="sub_contractor_name" length="100"></column>
		</property>
		<many-to-one name="master" entity-name="com.xyst.dinas.project.datamodel.ProjectFiled" fetch="select">
			<column name="master_id"  not-null="false"/>
		</many-to-one>
	</class>
</hibernate-mapping>