<?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.production.datamodel.SandMining" table="xyst_dinas_production_sand_mining" 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"/> </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"/> </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"/> </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"/> </property> <property name="discard" type="boolean" not-null="false"> <column name="discard"/> </property> <property name="del" type="boolean" not-null="false"> <column name="del"/> </property> <property name="approveState" type="integer" not-null="false"> <column name="approve_state"/> </property> <many-to-one name="regionalCompany" entity-name="com.xyst.dinas.biz.datamodel.xystOrganization" fetch="select"> <column name="regional_company" not-null="false"> <comment>所属组织机构</comment> </column> </many-to-one> <many-to-one name="sandMiningArea" entity-name="com.xyst.dinas.biz.datamodel.SandMiningArea" fetch="select"> <column name="sand_mining_area_id" not-null="false"> <comment>所属采区</comment> </column> </many-to-one> <property name="permitCode" type="nstring" not-null="true"> <column name="permit_code" length="30" > <comment>许可证编号</comment> </column> </property> <property name="miningNature" type="int" > <column name="mining_nature" not-null="false"> <comment>开采性质 0公益性 1经营性</comment> </column> </property> <property name="status" type="int" > <column name="status" not-null="false"> <comment>许可证状态 0未开始 1生效中 2已结束 </comment> </column> </property> <property name="workMethod" type="int" > <column name="work_method" not-null="false"> <comment>作业方式 0链条挖斗式 1抽泵式</comment> </column> </property> <property name="sandMiningStart" type="timestamp" not-null="true"> <column name="sand_mining_start"> <comment>可采期开始时间</comment> </column> </property> <property name="sandMiningEnd" type="timestamp" not-null="true"> <column name="sand_mining_end"> <comment>可采期结束时间</comment> </column> </property> <property name="workStartTime" type="timestamp" not-null="true"> <column name="work_start_time"> <comment>作业开始时间</comment> </column> </property> <property name="workEndTime" type="timestamp" not-null="true"> <column name="work_end_time"> <comment>作业结束时间</comment> </column> </property> <property name="miningVolume" type="big_decimal" not-null="false"> <column name="mining_volume" precision="12" scale="2"> <comment>开采量</comment> </column> </property> <property name="miningDepth" type="big_decimal" not-null="false"> <column name="mining_depth" precision="12" scale="2"> <comment>开采深度</comment> </column> </property> <bag name="stationDetails" lazy="true" fetch="select" inverse="true"> <key column="master_id" not-null="true" /> <one-to-many entity-name="com.xyst.dinas.production.datamodel.SandMiningAssociatedSandMiningStationDetail" /> </bag> <property name="sandMiningRange" type="nstring" not-null="false"> <column name="sand_mining_range" length="3000" > <comment>采砂范围</comment> </column> </property> <many-to-one name="ship" entity-name="com.xyst.dinas.biz.datamodel.ShipInfo" fetch="select"> <column name="ship_info_id" not-null="false"> <comment>船只</comment> </column> </many-to-one> <property name="shipOwner" type="nstring" not-null="false"> <column name="ship_owner" length="500" > <comment>船只所有人 逗号分隔</comment> </column> </property> <property name="workUser" type="nstring" not-null="false"> <column name="work_user" length="500" > <comment>作业人员 逗号分隔</comment> </column> </property> <property name="sandMiningPower" type="nstring" not-null="false"> <column name="sand_mining_power" length="50" > <comment>采砂功率</comment> </column> </property> </class> <class entity-name="com.xyst.dinas.production.datamodel.SandMiningAssociatedSandMiningStationDetail" table="xyst_dinas_production_sand_mining_station_detail"> <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="master" entity-name="com.xyst.dinas.production.datamodel.SandMining" fetch="select"> <column name="master_id" not-null="true"/> </many-to-one> <many-to-one name="station" entity-name="com.xyst.dinas.biz.datamodel.Station" fetch="select"> <column name="station_id" not-null="true"/> </many-to-one> </class> </hibernate-mapping>