diff options
Diffstat (limited to 'Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/SeguradoraContatoMap.cs')
| -rw-r--r-- | Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/SeguradoraContatoMap.cs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/SeguradoraContatoMap.cs b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/SeguradoraContatoMap.cs new file mode 100644 index 0000000..8c19c92 --- /dev/null +++ b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/SeguradoraContatoMap.cs @@ -0,0 +1,28 @@ +using FluentNHibernate.Mapping;
+using Gestor.Infrastructure.Entities.Common;
+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 SeguradoraContatoMap : ClassMap<SeguradoraContatoDb>
+ {
+ public SeguradoraContatoMap()
+ {
+ base.Table("ciacontato");
+ base.LazyLoad();
+ base.Id((SeguradoraContatoDb x) => (object)x.Id).GeneratedBy.Identity().Column("idciacontato");
+ base.References<EmpresaDb>((SeguradoraContatoDb x) => x.Empresa).Column("idempresa").Not.Nullable().Fetch.Join();
+ base.References<SeguradoraDb>((SeguradoraContatoDb x) => x.Seguradora).Column("idciaseg").Not.Nullable().Fetch.Join();
+ base.Map((SeguradoraContatoDb x) => x.NomeContato).Column("nome");
+ base.Map((SeguradoraContatoDb x) => (object)x.Tipo).CustomType<TipoTelefone>().Column("idfonetipo");
+ base.Map((SeguradoraContatoDb x) => x.Prefixo).Column("ddd");
+ base.Map((SeguradoraContatoDb x) => x.Numero).Column("fone");
+ base.Map((SeguradoraContatoDb x) => x.Email).Column("email");
+ base.Map((SeguradoraContatoDb x) => (object)x.TipoContato).CustomType<TipoContatoSeguradora>().Default("0");
+ }
+ }
+}
\ No newline at end of file |