Station.hbm.xml 5.39 KB
Newer Older
高晓磊 committed
1 2 3 4 5 6 7 8 9 10 11 12
<?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.biz.datamodel.Station" table="xyst_dinas_biz_station" 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">
13
            <column name="create_time"/>
高晓磊 committed
14 15 16 17 18
        </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">
19
            <column name="modify_time"/>
高晓磊 committed
20 21 22 23
        </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>
高晓磊 committed
24
        <property name="billState" type="nstring" not-null="false">
25
            <column name="bill_state" length="100"/>
高晓磊 committed
26 27 28 29 30
        </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">
31
            <column name="bill_code" length="200"/>
高晓磊 committed
32 33
        </property>
        <property name="discard" type="boolean" not-null="false">
34
            <column name="discard"/>
高晓磊 committed
35 36
        </property>
        <property name="del" type="boolean" not-null="false">
37
            <column name="del"/>
高晓磊 committed
38 39
        </property>
        <property name="approveState" type="integer" not-null="false">
40
            <column name="approve_state"/>
高晓磊 committed
41 42
        </property>

高晓磊 committed
43 44
        <many-to-one name="regionalCompany" entity-name="com.xyst.dinas.biz.datamodel.Organization" fetch="select">
            <column name="regional_company"  not-null="false">
45 46
                <comment>所属部门</comment>
            </column>
高晓磊 committed
47 48
        </many-to-one>
        <property name="stationName" type="nstring" not-null="true">
49 50 51
            <column name="station_name" length="30"  >
                <comment>场站名称</comment>
            </column>
高晓磊 committed
52
        </property>
53
        <property name="stationAddress" type="nstring" length="80"  not-null="false">
54 55 56
            <column name="station_address">
                <comment>场站地址</comment>
            </column>
高晓磊 committed
57
        </property>
58
        <property name="stationStatus" type="integer" not-null="true">
59 60 61
            <column name="station_status" >
                <comment>场站状态,0已停业1经营中</comment>
            </column>
高晓磊 committed
62 63
        </property>
        <property name="stationCoordinate" type="nstring" not-null="false">
64 65 66
            <column name="station_coordinate">
                <comment>场站的坐标按照逗号分隔</comment>
            </column>
高晓磊 committed
67 68
        </property>
        <property name="linkMan" type="nstring" not-null="false">
69 70 71
            <column name="link_man">
                <comment>联系人</comment>
            </column>
高晓磊 committed
72 73
        </property>
        <property name="openingDate" type="timestamp" not-null="false">
74 75 76
            <column name="opening_date">
                <comment>开业时间</comment>
            </column>
高晓磊 committed
77 78
        </property>
        <property name="telephone" type="nstring" not-null="false">
79 80 81
            <column name="telephone" length="50">
                <comment>联系方式</comment>
            </column>
高晓磊 committed
82 83
        </property>
        <property name="reason" type="nstring" not-null="false">
84 85 86 87
            <column name="reason" length="300" >
                <comment>备注</comment>
            </column>
        </property>
88
        <property name="sortOrder" type="int" not-null="true"  unique="true" index="station_sort_index" >
89 90 91
            <column name="sort_order" length="10">
                <comment >排序</comment>
            </column>
高晓磊 committed
92
        </property>
93 94 95 96
        <bag name="productionLines" lazy="true" fetch="select" inverse="true">
            <key column="station_id" not-null="true" />
            <one-to-many entity-name="com.xyst.dinas.biz.datamodel.ProductionLine" />
        </bag>
高晓磊 committed
97
    </class>
98
    <class entity-name="com.xyst.dinas.biz.datamodel.ProductionLine" table="xyst_dinas_biz_production_Line">
99 100 101 102
        <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>
103 104
        <many-to-one name="station" entity-name="com.xyst.dinas.biz.datamodel.Station" fetch="select" >
            <column name="station_id"  not-null="false" >
105 106 107 108 109 110 111 112 113
                <comment>所属场站</comment>
            </column>
        </many-to-one>
        <property name="name" type="nstring" not-null="false">
            <column name="name">
                <comment>名称</comment>
            </column>
        </property>
    </class>
高晓磊 committed
114
</hibernate-mapping>