<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
                                   "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
 <class name="com.jsh.model.po.DepotHead" table="jsh_depothead">
  <id name="Id" type="java.lang.Long">
   <column name="Id"/>
   <generator class="native"/>
  </id>
  <property generated="never" lazy="false" name="Type" type="java.lang.String">
   <column length="50" name="Type">
    <comment>类型(出库/入库)</comment>
   </column>
  </property>
  <property generated="never" lazy="false" name="SubType" type="java.lang.String">
   <column length="50" name="SubType">
    <comment>出入库分类</comment>
   </column>
  </property>
  <many-to-one name="ProjectId" class="com.jsh.model.po.Depot" lazy="false">
    <column name="ProjectId" not-null="true">
     <comment>项目Id</comment>
    </column>
  </many-to-one>
  <property generated="never" lazy="false" name="Number" type="java.lang.String">
   <column length="50" name="Number">
    <comment>票据号</comment>
   </column>
  </property>
  <property generated="never" lazy="false" name="OperPersonName" type="java.lang.String">
   <column length="50" name="OperPersonName">
    <comment>操作员名字</comment>
   </column>
  </property>
  <property name="CreateTime" type="java.sql.Timestamp">
   <column length="19" name="CreateTime">
    <comment>创建时间</comment>
   </column>
  </property>
  <property name="OperTime" type="java.sql.Timestamp">
   <column length="19" name="OperTime">
    <comment>出入库时间</comment>
   </column>
  </property>
  <many-to-one name="OrganId" class="com.jsh.model.po.Supplier" lazy="false">
   <column name="OrganId">
    <comment>供应商Id</comment>
   </column>
  </many-to-one>
  <many-to-one name="HandsPersonId" class="com.jsh.model.po.Person" lazy="false">
   <column name="HandsPersonId">
    <comment>采购/领料-经手人Id</comment>
   </column>
  </many-to-one>
  <many-to-one name="WareHousePersonId" class="com.jsh.model.po.Person" lazy="false">
   <column name="WareHousePersonId" not-null="true">
    <comment>仓管员-经手人Id</comment>
   </column>
  </many-to-one>
  <property generated="never" lazy="false" name="SettlementWay" type="java.lang.String">
   <column length="50" name="SettlementWay">
    <comment>现金/记账</comment>
   </column>
  </property>
  <many-to-one name="BuildingId" class="com.jsh.model.po.Building" lazy="false">
   <column name="BuildingId">
    <comment>单元Id</comment>
   </column>
  </many-to-one>
  <many-to-one name="AllocationProjectId" class="com.jsh.model.po.Depot" lazy="false">
    <column name="AllocationProjectId">
     <comment>调拨时，对方项目Id</comment>
    </column>
  </many-to-one>
  <property generated="never" lazy="false" name="Remark" type="java.lang.String">
   <column length="1000" name="Remark">
    <comment>备注</comment>
   </column>
  </property>
  <property generated="never" lazy="false" name="State" type="java.lang.String">
   <column length="50" name="State">
    <comment>草稿/已生效/废弃/待审核/未通过</comment>
   </column>
  </property>
  <property generated="never" lazy="false" name="ReAuditPersonName" type="java.lang.String">
   <column length="50" name="ReAuditPersonName">
    <comment>撤审人</comment>
   </column>
  </property>
  <property generated="never" lazy="false" name="Reason" type="java.lang.String">
   <column length="100" name="Reason">
    <comment>撤审原因</comment>
   </column>
  </property>
 </class>
</hibernate-mapping>
