diff options
Diffstat (limited to 'Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Common/EmpresaMap.cs')
| -rw-r--r-- | Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Common/EmpresaMap.cs | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Common/EmpresaMap.cs b/Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Common/EmpresaMap.cs new file mode 100644 index 0000000..53d2e0c --- /dev/null +++ b/Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Common/EmpresaMap.cs @@ -0,0 +1,53 @@ +using FluentNHibernate.Mapping;
+using Gestor.Infrastructure.Entities.Common;
+using Gestor.Infrastructure.Entities.Generic;
+using System;
+using System.Linq.Expressions;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Infrastructure.Mappings.Common
+{
+ public class EmpresaMap : ClassMap<EmpresaDb>
+ {
+ public EmpresaMap()
+ {
+ base.Table("empresa");
+ base.LazyLoad();
+ base.Id((EmpresaDb x) => (object)x.Id).GeneratedBy.Identity().Column("idempresa");
+ base.Map((EmpresaDb x) => x.Nome).Column("nome").Not.Nullable();
+ base.Map((EmpresaDb x) => x.NomeSocial);
+ base.Map((EmpresaDb x) => x.Documento).Column("cgccpf");
+ base.Map((EmpresaDb x) => x.Serial).Column("ns");
+ base.Map((EmpresaDb x) => x.Cep).Column("cep");
+ base.Map((EmpresaDb x) => x.Endereco).Column("endereco");
+ base.Map((EmpresaDb x) => x.Numero).Column("numero");
+ base.Map((EmpresaDb x) => x.Complemento).Column("complemento");
+ base.Map((EmpresaDb x) => x.Bairro).Column("bairro");
+ base.Map((EmpresaDb x) => x.Cidade).Column("cidade");
+ base.Map((EmpresaDb x) => x.Estado).Column("uf");
+ base.Map((EmpresaDb x) => x.Site).Column("site");
+ base.Map((EmpresaDb x) => x.Email).Column("email");
+ base.Map((EmpresaDb x) => (object)x.TipoTelefone1).CustomType<TipoTelefone?>();
+ base.Map((EmpresaDb x) => x.PrimeiroPrefixo).Column("ddd");
+ base.Map((EmpresaDb x) => x.PrimeiroTelefone).Column("telefone");
+ base.Map((EmpresaDb x) => (object)x.TipoTelefone2).CustomType<TipoTelefone?>();
+ base.Map((EmpresaDb x) => x.SegundoPrefixo).Column("ddd2");
+ base.Map((EmpresaDb x) => x.SegundoTelefone).Column("telefone2");
+ base.Map((EmpresaDb x) => (object)x.QuantidadeFuncionarios).Column("nfuncionarios");
+ base.Map((EmpresaDb x) => x.QuantidadeFiliais).Column("unidade");
+ base.Map((EmpresaDb x) => x.Responsavel).Column("nomeresponsavel");
+ base.Map((EmpresaDb x) => x.EmailResponsavel).Column("emailresponsavel");
+ base.Map((EmpresaDb x) => x.SenhaAdmin).Column("senhaadm");
+ base.Map((EmpresaDb x) => x.Facebook);
+ base.Map((EmpresaDb x) => x.Instagram);
+ base.Map((EmpresaDb x) => x.Linkdin);
+ base.Map((EmpresaDb x) => x.Whatsapp);
+ base.Map((EmpresaDb x) => x.WhatsappSinistro);
+ base.Map((EmpresaDb x) => x.Twitter);
+ base.Map((EmpresaDb x) => x.Localizacao);
+ base.Map((EmpresaDb x) => x.Logo).CustomSqlType("varbinary(max)").Length(2147483647);
+ base.Map((EmpresaDb x) => x.LogoId);
+ base.Map((EmpresaDb x) => (object)x.MaxFileSize).Column("filesize");
+ }
+ }
+}
\ No newline at end of file |