<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="Domain" namespace="Domain">
	<class name="FaultRecord" table="tb_FaultRecords">
		<id name="ID" column="ID" type="int" unsaved-value="0">
			<generator class="native" />
		</id>
		<property name="Status" column="Status" type="int"  />
		<property name="IsCancel" column="IsCancel" type="bool" />
		<property name="Number" column="Number" type="string" />
		<property name="RoomNumber" column="RoomNumber" type="string"  />
		<many-to-one name="FaultType" column="FaultTypeID" not-found="ignore" cascade="none" />
		<property name="FaultTime" column="FaultTime" type="DateTime"  />
		<property name="Description" column="Description" type="string"  />
		<property name="RegisteredPerson" column="RegisteredPerson" type="string"  />
		<property name="RegisteredTime" column="RegisteredTime" type="DateTime"  />
		<property name="RepairPerson" column="RepairPerson" type="string"  />
		<property name="RepairTime" column="RepairTime" type="DateTime"  />
		<property name="RepairContent" column="RepairContent" type="string"  />
		<property name="CancelPerson" column="CancelPerson" type="string"  />
		<property name="CancelTime" column="CancelTime" type="DateTime"  />
		<property name="CancelReason" column="CancelReason" type="string"  />
    <property name="HotelID" column="HotelID" type="int"  />
	</class>
	<sql-query name="GenerateFaultNumber">
		<return-scalar column="FaultNumber" type="string"/>
		exec GenerateFaultNumber
	</sql-query>
</hibernate-mapping>