OpenAuth.Net/OpenAuth.Repository/Models/Mapping/ModuleElementGrantMap.cs

25 lines
861 B
C#
Raw Normal View History

2015-10-26 21:58:12 +08:00
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using OpenAuth.Domain;
namespace OpenAuth.Repository.Models.Mapping
{
2015-11-13 23:25:46 +08:00
public class ModuleElementGrantMap : EntityTypeConfiguration<ModuleElementGrant>
2015-10-26 21:58:12 +08:00
{
2015-11-13 23:25:46 +08:00
public ModuleElementGrantMap()
2015-10-26 21:58:12 +08:00
{
// Primary Key
this.HasKey(t => t.Id);
// Properties
// Table & Column Mappings
2015-11-13 23:25:46 +08:00
this.ToTable("ModuleElementGrant");
2015-10-26 21:58:12 +08:00
this.Property(t => t.Id).HasColumnName("Id");
this.Property(t => t.ElementId).HasColumnName("ElementId");
this.Property(t => t.UserId).HasColumnName("UserId");
this.Property(t => t.RoleId).HasColumnName("RoleId");
this.Property(t => t.GrantType).HasColumnName("GrantType");
}
}
}