<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
    
<hibernate-mapping>
<!-- 
    Created by the Middlegen Hibernate plugin 2.1

    http://boss.bekk.no/boss/middlegen/
    http://www.hibernate.org/
-->

<class 
    name="cn.com.xunuo.model.Sysuser" 
    table="sysuser"
>
    <meta attribute="class-description" inherit="false">
       @hibernate.class
        table="sysuser"
    </meta>

    <id
        name="id"
        type="java.lang.String"
        column="id"
        unsaved-value="null"
    >
        <meta attribute="field-description">
           @hibernate.id
            generator-class="uuid.hex"
            type="java.lang.String"
            column="id"

        </meta>
        <generator class="uuid.hex" />
    </id>

    <property
        name="name"
        type="java.lang.String"
        column="name"
        length="50"
    >
        <meta attribute="field-description">
           @hibernate.property
            column="name"
            length="50"
        </meta>    
    </property>

    <property
        name="password"
        type="java.lang.String"
        column="password"
        length="50"
    >
        <meta attribute="field-description">
           @hibernate.property
            column="password"
            length="50"
        </meta>    
    </property>

    <property
        name="truename"
        type="java.lang.String"
        column="truename"
        length="50"
    >
        <meta attribute="field-description">
           @hibernate.property
            column="truename"
            length="50"
        </meta>    
    </property>

    <property
        name="type"
        type="java.lang.Integer"
        column="type"
        length="4"
    >
        <meta attribute="field-description">
           @hibernate.property
            column="type"
            length="4"
        </meta>    
    </property>

    <property
        name="status"
        type="java.lang.Integer"
        column="status"
        length="4"
    >
        <meta attribute="field-description">
           @hibernate.property
            column="status"
            length="4"
        </meta>    
    </property>

    <property
        name="department"
        type="java.lang.String"
        column="department"
        length="255"
    >
        <meta attribute="field-description">
           @hibernate.property
            column="department"
            length="255"
        </meta>    
    </property>

    <property
        name="revisable"
        type="java.lang.Integer"
        column="revisable"
        length="4"
    >
        <meta attribute="field-description">
           @hibernate.property
            column="revisable"
            length="4"
        </meta>    
    </property>

	<bag
            name="sysuser_Roles"
            table="sysuser_role"
            lazy="true"
            inverse="false"
            cascade="none"
        >

              <key
                  column="userid"
              >
              </key>

              <many-to-many
                  class="cn.com.xunuo.model.Sysuserrole"
                  column="roleid"
                 />
        </bag>

	<bag
            name="sysuser_InputColumns"
			table="sysuser_inputcolumn"
            lazy="true"
            inverse="false"
            cascade="none"
        >

              <key
                  column="userid"
              >
              </key>
              <many-to-many
                  class="cn.com.xunuo.model.Plate"
				  column="columnid"
              />
        </bag>
        
		<bag
            name="sysuser_CheckColumns"
			table="sysuser_checkcolumn"
            lazy="true"
            inverse="false"
            cascade="none"
        >

              <key
                  column="userid"
              >
              </key>                                                                                                                                                                                   

              <many-to-many
                  class="cn.com.xunuo.model.Plate"
				  column="columnid"
              />
        </bag>
	<!-- Associations -->
  

</class>
</hibernate-mapping>



