diff options
Diffstat (limited to 'Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/RepasseMap.cs')
| -rw-r--r-- | Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/RepasseMap.cs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/RepasseMap.cs b/Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/RepasseMap.cs new file mode 100644 index 0000000..cff9f61 --- /dev/null +++ b/Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/RepasseMap.cs @@ -0,0 +1,29 @@ +using FluentNHibernate.Mapping;
+using Gestor.Infrastructure.Entities.Generic;
+using Gestor.Infrastructure.Entities.Seguros;
+using System;
+using System.Linq.Expressions;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Infrastructure.Mappings.Seguros
+{
+ public class RepasseMap : ClassMap<RepasseDb>
+ {
+ public RepasseMap()
+ {
+ base.Table("repasse");
+ base.LazyLoad();
+ base.Id((RepasseDb x) => (object)x.Id).GeneratedBy.Identity().Column("idrepasse");
+ base.References<VendedorDb>((RepasseDb x) => x.Vendedor).Column("idvendedor").Not.Nullable().Fetch.Join();
+ base.References<RamoDb>((RepasseDb x) => x.Ramo).Column("idramo").Fetch.Join();
+ base.Map((RepasseDb x) => (object)x.Tipo).CustomType<CustomEnumType<TipoRepasse>>().Column("tipo");
+ base.Map((RepasseDb x) => (object)x.Incidencia).CustomType<CustomEnumType<TipoIncidencia>>().Column("incidencia");
+ base.Map((RepasseDb x) => (object)x.Forma).CustomType<CustomEnumType<FormaRepasse>>().Column("forma");
+ base.Map((RepasseDb x) => (object)x.ValorNovo).Column("vlrnovo");
+ base.Map((RepasseDb x) => (object)x.ValorRenovacao).Column("vlrrenovacao");
+ base.Map((RepasseDb x) => (object)x.Base).CustomType<CustomEnumType<BaseRepasse>>().Column("base");
+ base.Map((RepasseDb x) => (object)x.Seguradora).Column("idciaseg");
+ base.Map((RepasseDb x) => (object)x.Ativo).Column("ativo").CustomType<CustomBoolType>();
+ }
+ }
+}
\ No newline at end of file |