<?xml version="1.0"?>

<mapping>

    <class name="com.titan.cabin.CabinBean" identity="id" key-generator="MAX">
        <map-to table="cabin"/>
        <field name="id" type="integer" direct="true">
            <sql name="id" type="integer"/>
        </field>
        <field name="shipId" type="integer" direct="true">
            <sql name="ship_id" type="integer" dirty="check"/>
        </field>
        <field name="bedCount" type="integer" direct="true">
            <sql name="bed_count" type="integer" dirty="check"/>
        </field>
        <field name="name" type="string" direct="true">
            <sql name="name" type="varchar" dirty="check"/>
        </field>
        <field name="deckLevel" type="integer" direct="true">
            <sql name="deck_level" type="integer" dirty="check"/>
        </field>
    </class>

    <class name="com.titan.ship.ShipBean" identity="id" key-generator="MAX">
        <map-to table="ship"/>
        <field name="id" type="integer" direct="true">
            <sql name="id" type="integer"/>
        </field>
        <field name="name" type="string" direct="true">
            <sql name="name" type="varchar" dirty="check"/>
        </field>
        <field name="capacity" type="integer" direct="true">
            <sql name="capacity" type="integer" dirty="check"/>
        </field>
        <field name="tonnage" type="double" direct="true">
            <sql name="tonnage" type="decimal" dirty="check"/>
        </field>
    </class>

</mapping>

