<?xml version="1.0" encoding="utf-8" ?>

<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="Domain" namespace="Domain">
  <class name="SysUsers" table="tb_Sys_Users">
    <id name="ID" column="ID" type="int" unsaved-value="0">
      <generator class="native" />
    </id>
    <property name="Account" column="Account" type="string"  />
    <property name="Password" column="Password" type="string"  />
    <property name="Password2" column="Password2" type="string"  />
    <property name="Name" column="Name" type="string"  />
    <property name="DistrictID" column="DistrictID" type="int"  />
    <property name="DepartmentID" column="DepartmentID" type="int"  />
    <property name="PositionID" column="PositionID" type="int"  />
    <many-to-one name="Role" column="RoleID" not-found="ignore" cascade="none" />
    <many-to-one name="Group" column="GroupID" not-found="ignore" cascade="none" />
    <many-to-one name="SysHotelGroup" column="SysHotelGroupID" not-found="ignore" cascade="none" />
    <property name="Sex" column="Sex" type="string" length="2" />
    <property name="Phone" column="Phone" type="string"  />
    <property name="Email" column="Email" type="string"  />
    <property name="Sort" column="Sort" type="int"  />
    <property name="Remark" column="Remark" type="string"  />
    <property name="ActiveIndicator" column="ActiveIndicator" type="bool"  />
    <property name="CreatedBy" column="CreatedBy" type="string"  />
    <property name="CreatedDate" column="CreatedDate" type="DateTime"  />
    <property name="ModifiedBy" column="ModifiedBy" type="string"  />
    <property name="ModifiedDate" column="ModifiedDate" type="DateTime"  />
    <property name="LoginIP" column="LoginIP" type="string"  />
    <bag name="Hotels" table="tb_Sys_UserHotel" lazy="false">
      <key column="UserID" />
      <many-to-many class="SysHotel" column="HotelID" />
    </bag>
    <property name="HotelID" column="HotelID" type="int"  />
    <property name="Last_Modified_Time" column="Last_Modified_Time" type="DateTime"  />
    <property name="IsDeleted" column="IsDeleted" type="bool" />
  </class>
</hibernate-mapping>
