//------------------------------------------------------------------------------
// This is auto-generated code.
//------------------------------------------------------------------------------
// This code was generated by Entity Developer tool using NHibernate Fluent Mapping template.
// Code is generated on: 20.06.2012 18:29:09
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//------------------------------------------------------------------------------

using System;
using System.Collections;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using FluentNHibernate.Mapping;
using FluentNHibernate.MappingModel.Collections;

namespace TPC
{
    public class SnakeMap : SubclassMap<Snake>
    {
        public SnakeMap()
        {
              Table("Snake");
              LazyLoad();
              Map(x => x.Length)    
                .Column("Length")
                .CustomType("Decimal")
                .Access.Property()
                .Generated.Never()
                .CustomSqlType("NUMERIC");
              Map(x => x.IsVenomous)    
                .Column("IsVenomous")
                .CustomType("Boolean")
                .Access.Property()
                .Generated.Never()
                .CustomSqlType("BOOLEAN");
        }
    }

    public class DogMap : SubclassMap<Dog>
    {
        public DogMap()
        {
              Table("Dog");
              LazyLoad();
              Map(x => x.Breed)    
                .Column("Breed")
                .CustomType("String")
                .Access.Property()
                .Generated.Never()
                .CustomSqlType("VARCHAR")
                .Not.Nullable()
                .Length(128);
        }
    }

    public class AnimalMap : ClassMap<Animal>
    {
        public AnimalMap()
        {
              Table("Animals");
              LazyLoad();
              UseUnionSubclassForInheritanceMapping();
              Id(x => x.ID)
                .Column("ID")
                .CustomType("Int32")
                .Access.Property()
                .CustomSqlType("INTEGER")
                .Not.Nullable()
                .GeneratedBy.Assigned();
              Map(x => x.FoodClassification)    
                .Column("FoodClassification")
                .CustomType("String")
                .Access.Property()
                .Generated.Never()
                .CustomSqlType("VARCHAR")
                .Not.Nullable()
                .Length(128);
        }
    }

}
