<?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.transport.datamodel.VehicleDispatch" table="xyst_dinas_transport_vehicle_dispatch" 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="purchaseSandUnit" entity-name="com.xyst.dinas.project.datamodel.PurchaseSandCompany" fetch="select"> <column name="purchase_sand_unit_id" not-null="false"> <comment>所属购砂单位</comment> </column> </many-to-one> <many-to-one name="planningCycle" entity-name="com.xyst.dinas.biz.datamodel.PlanningCycle" fetch="select"> <column name="planning_cycle_id" not-null="false"> <comment>所属计划周期</comment> </column> </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"> <comment>所属项目</comment> </column> </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"> <comment>所属砂石类型</comment> </column> </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"> <comment>所属场站</comment> </column> </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"> <comment>所属合同</comment> </column> </many-to-one> <property name="actualTransportation" type="big_decimal" not-null="false"> <column name="actual_transportation" length="13"> <comment>实际运输量</comment> </column> </property> <property name="planAmount" type="big_decimal" not-null="false"> <column name="plan_amount" length="13"> <comment>计划运输量</comment> </column> </property> <property name="dispatchStatus" type="int" not-null="true"> <column name="dispatch_status" length="13"> <comment>状态 0未开始 1开始 2已结束 3异常(无人认领?)</comment> </column> </property> <property name="dispatchType" type="int" not-null="true"> <column name="dispatch_type" length="13"> <comment>类型0临时销售计划 1需用计划</comment> </column> </property> <property name="sealDetailId" type="uuid-binary" not-null="true"> <column name="seal_detail_id" length="16"> <comment>销售计划子表或者临时销售计划子表的id</comment> </column> </property> <many-to-one name="transportCompany" entity-name="com.xyst.dinas.transport.datamodel.TransportCompany" fetch="select"> <column name="transport_company_id" not-null="false"> <comment>派单公司</comment> </column> </many-to-one> <many-to-one name="transportVehicle" entity-name="com.xyst.dinas.transport.datamodel.TransportVehicle" fetch="select"> <column name="transport_vehicle_id" not-null="false"> <comment>派单车辆</comment> </column> </many-to-one> </class> </hibernate-mapping>