summaryrefslogtreecommitdiff
path: root/Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Financeiro/FornecedorMap.cs
diff options
context:
space:
mode:
authorLucas Faria Mendes <lucas.fariamo08@gmail.com>2026-03-30 13:38:18 +0000
committerLucas Faria Mendes <lucas.fariamo08@gmail.com>2026-03-30 13:38:18 +0000
commit1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 (patch)
treee1c3b20ea08f0cf71122a1e73f0d395f8fd83874 /Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Financeiro/FornecedorMap.cs
parent674ca83ba9243a9e95a7568c797668dab6aee26a (diff)
downloadgestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.tar.gz
gestor-1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1.zip
chore: location
Diffstat (limited to 'Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Financeiro/FornecedorMap.cs')
-rw-r--r--Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Financeiro/FornecedorMap.cs42
1 files changed, 42 insertions, 0 deletions
diff --git a/Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Financeiro/FornecedorMap.cs b/Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Financeiro/FornecedorMap.cs
new file mode 100644
index 0000000..431c4a8
--- /dev/null
+++ b/Codemerx/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Financeiro/FornecedorMap.cs
@@ -0,0 +1,42 @@
+using FluentNHibernate.Mapping;
+using Gestor.Infrastructure.Entities.Financeiro;
+using Gestor.Infrastructure.Entities.Generic;
+using System;
+using System.Linq.Expressions;
+using System.Runtime.CompilerServices;
+
+namespace Gestor.Infrastructure.Mappings.Financeiro
+{
+ public class FornecedorMap : ClassMap<FornecedorDb>
+ {
+ public FornecedorMap()
+ {
+ base.Table("fornecedor");
+ base.LazyLoad();
+ base.Id((FornecedorDb x) => (object)x.Id).GeneratedBy.Identity().Column("idfornecedor");
+ base.Map((FornecedorDb x) => (object)x.IdEmpresa).Column("idempresa").Not.Nullable();
+ base.Map((FornecedorDb x) => (object)x.IdCentro).Column("idcentro");
+ base.Map((FornecedorDb x) => (object)x.IdConta).Column("idconta");
+ base.Map((FornecedorDb x) => (object)x.IdPlano).Column("idcplanos");
+ base.Map((FornecedorDb x) => (object)x.TipoPagamento).CustomType<TipoPagamento>().Column("idtipopagto");
+ base.Map((FornecedorDb x) => x.Nome).Column("nome");
+ base.Map((FornecedorDb x) => x.Documento).Column("cpfcnpj");
+ base.Map((FornecedorDb x) => x.Cep).Column("cep");
+ base.Map((FornecedorDb x) => x.Cidade).Column("cidade");
+ base.Map((FornecedorDb x) => x.Estado).Column("uf");
+ base.Map((FornecedorDb x) => x.Bairro).Column("bairro");
+ base.Map((FornecedorDb x) => x.Endereco).Column("endereco");
+ base.Map((FornecedorDb x) => x.Numero).Column("numero");
+ base.Map((FornecedorDb x) => x.Complemento).Column("complemento");
+ base.Map((FornecedorDb x) => (object)x.TipoTelefone1).CustomType<TipoTelefone>().Column("idfonetipo1");
+ base.Map((FornecedorDb x) => x.Prefixo1).Column("ddd1");
+ base.Map((FornecedorDb x) => x.Telefone1).Column("fone1");
+ base.Map((FornecedorDb x) => (object)x.TipoTelefone2).CustomType<TipoTelefone>().Column("idfonetipo2");
+ base.Map((FornecedorDb x) => x.Prefixo2).Column("ddd2");
+ base.Map((FornecedorDb x) => x.Telefone2).Column("fone2");
+ base.Map((FornecedorDb x) => (object)x.Ativo).Column("Ativo");
+ base.Map((FornecedorDb x) => x.Email).Column("email");
+ base.Map((FornecedorDb x) => x.Observacao).CustomType("StringClob").CustomSqlType("varchar(MAX)");
+ }
+ }
+} \ No newline at end of file