summaryrefslogtreecommitdiff
path: root/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/PermissaoUsuarioMap.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/PermissaoUsuarioMap.cs')
-rw-r--r--Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/PermissaoUsuarioMap.cs25
1 files changed, 25 insertions, 0 deletions
diff --git a/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/PermissaoUsuarioMap.cs b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/PermissaoUsuarioMap.cs
new file mode 100644
index 0000000..eade562
--- /dev/null
+++ b/Gestor.Infrastructure/Gestor.Infrastructure.Mappings.Seguros/PermissaoUsuarioMap.cs
@@ -0,0 +1,25 @@
+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 PermissaoUsuarioMap : ClassMap<PermissaoUsuarioDb>
+ {
+ public PermissaoUsuarioMap()
+ {
+ base.Table("PermissaoUsuario");
+ base.LazyLoad();
+ base.Id((PermissaoUsuarioDb x) => (object)x.Id).GeneratedBy.Identity().Column("Id");
+ base.References<UsuarioDb>((PermissaoUsuarioDb x) => x.Usuario).Column("IdUsuario").Not.Nullable().Fetch.Join();
+ base.Map((PermissaoUsuarioDb x) => (object)x.Tela).CustomType<TipoTela>().Column("Tela");
+ base.Map((PermissaoUsuarioDb x) => (object)x.Consultar).Column("Consultar");
+ base.Map((PermissaoUsuarioDb x) => (object)x.Incluir).Column("Incluir");
+ base.Map((PermissaoUsuarioDb x) => (object)x.Alterar).Column("Alterar");
+ base.Map((PermissaoUsuarioDb x) => (object)x.Excluir).Column("Excluir");
+ }
+ }
+} \ No newline at end of file