<?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 package="com.eplugger.shop.content.model">
<class name="Content"
      table="content"
      dynamic-update="false">
   <id name="id" column="id">
         <generator class="uuid.hex"/>
   </id>
   <property name="name" type="string" column="name"/>
   <property name="index" type="int" column="cindex"/>
   <property name="status" type="boolean" column="status"/>
   <property name="content" type="string" column="content"/>
   <property name="note" type="string" column="note"/>
   <property name="categoryId" type="string" column="categoryid"/>
   <property name="adId" type="string" column="ad_id"/>
   <property name="leftAdId" type="string" column="leftad_id"/>
   <property name="type" type="string" column="type"/>
   <property name="linkurl" type="string" column="linkurl"/>
   <property name="fileName" type="string" column="file_name"/>
   <property name="navImage" type="string" column="nav_image"/>
   <property name="createTime" type="string" column="create_time"/>
   <property name="creator" type="string" column="creator"/>
   <property name="isnew" type="boolean" column="isnew"/>
 </class>
 <class name="AdLink"
      table="adlink"
      dynamic-update="false">
   <id name="id" column="id">
         <generator class="uuid.hex"/>
   </id>
   <property name="name" type="string" column="name"/>
   <property name="linkurl" type="string" column="linkurl"/>
   <property name="navImage" type="string" column="nav_image"/>
   <property name="index" type="int" column="cindex"/>
   <property name="channelId" type="string" column="channel_id"/>
 </class>
 <class name="ContentCategory"
      table="content_category"
      dynamic-update="false">
   <id name="id" column="id">
         <generator class="uuid.hex"/>
   </id>
   <property name="name" type="string" column="name"/>
   <property name="type" type="string" column="type"/>
 </class>
  <class name="Inquisition"
    table="inquisition"
    dynamic-update="false">
  <id  name="id" column="uuid" type="string" >
       <generator class="uuid.hex"/>
  </id>
  <property name="name" type="string" column="name"/>
  <property name="channelId" type="string" column="channel_id"/>
  <property name="description" type="string" column="description"/>
  <set
      name="childList"
      inverse="true"
      lazy="false"
      order-by="name asc"
      cascade="all">
      <key column="inqu_id"/>
      <one-to-many class="InquisitionResult"/>
    </set>
</class>
<class name="InquisitionResult"
    table="inquisition_result"
    dynamic-update="false">
  <id  name="id" column="uuid" type="string" >
       <generator class="uuid.hex"/>
  </id>
  <property name="name" type="string" column="name"/>
  <many-to-one name="inquisition" class="Inquisition" column="inqu_id" not-null="true" outer-join="false"/>
  <property name="count" type="int" column="count"/>
</class>
   <class name="MessageBoard"
        table="messageboard"
        dynamic-update="false">
	   <id  name="id" column="ID" type="string" >
	         <generator class="uuid.hex"/>
	   </id>
	   <property name="author" type="string" column="AUTHOR"/>
	   <property name="area" type="string" column="AREA"/>
	   <property name="email" type="string" column="EMAIL"/>
	   <property name="phone" type="string" column="PHONE"/>
		 <property name="subject" type="string" column="SUBJECT"/>
	   <property name="content" type="string" column="CONTENT"/>
	   <property name="createTime" type="string" column="CREATE_TIME"/>
	   <property name="parentId" type="string" column="PARENT_ID"/>
	   <property name="sex" type="string" column="SEX"/>
	</class>
 </hibernate-mapping>

