SandMining.hbm.xml 7.08 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
<?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>

王炜晨 committed
44
        <many-to-one name="regionalCompany" entity-name="com.xyst.dinas.biz.datamodel.xystOrganization" fetch="select">
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
            <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">
72
                <comment>作业方式 0链条挖斗式 1抽泵式</comment>
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
            </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">
110
            <key column="master_id" not-null="true" />
高晓磊 committed
111
            <one-to-many entity-name="com.xyst.dinas.production.datamodel.SandMiningAssociatedstationDetail" />
112 113 114 115 116 117
        </bag>
        <property name="sandMiningRange" type="nstring" not-null="false">
            <column name="sand_mining_range" length="3000" >
                <comment>采砂范围</comment>
            </column>
        </property>
118 119 120
        <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>
121
            </column>
122
        </many-to-one>
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
        <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>

高晓磊 committed
140
    <class entity-name="com.xyst.dinas.production.datamodel.SandMiningAssociatedstationDetail" table="xyst_dinas_production_sand_mining_station_detail">
141 142 143 144
        <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>
145 146
        <many-to-one name="master" entity-name="com.xyst.dinas.production.datamodel.SandMining" fetch="select">
            <column name="master_id" not-null="true"/>
147 148 149 150 151 152
        </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>