Routine Update

This commit is contained in:
yubaolee
2015-11-13 23:25:46 +08:00
parent 4dac594250
commit 9df8c34126
27 changed files with 1229 additions and 2421 deletions

View File

@@ -4,21 +4,20 @@ using OpenAuth.Domain;
namespace OpenAuth.Repository.Models.Mapping
{
public class PageElementGrantMap : EntityTypeConfiguration<PageElementGrant>
public class ModuleElementGrantMap : EntityTypeConfiguration<ModuleElementGrant>
{
public PageElementGrantMap()
public ModuleElementGrantMap()
{
// Primary Key
this.HasKey(t => t.Id);
// Properties
// Table & Column Mappings
this.ToTable("PageElementGrant");
this.ToTable("ModuleElementGrant");
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.PostId).HasColumnName("PostId");
this.Property(t => t.GrantType).HasColumnName("GrantType");
}
}

View File

@@ -4,9 +4,9 @@ using OpenAuth.Domain;
namespace OpenAuth.Repository.Models.Mapping
{
public class PageElementMap : EntityTypeConfiguration<PageElement>
public class ModuleElementMap : EntityTypeConfiguration<ModuleElement>
{
public PageElementMap()
public ModuleElementMap()
{
// Primary Key
this.HasKey(t => t.Id);
@@ -25,13 +25,12 @@ namespace OpenAuth.Repository.Models.Mapping
.HasMaxLength(4000);
// Table & Column Mappings
this.ToTable("PageElement");
this.ToTable("ModuleElement");
this.Property(t => t.Id).HasColumnName("Id");
this.Property(t => t.DomId).HasColumnName("DomId");
this.Property(t => t.Name).HasColumnName("Name");
this.Property(t => t.Type).HasColumnName("Type");
this.Property(t => t.ModuleId).HasColumnName("ModuleId");
this.Property(t => t.PageId).HasColumnName("PageId");
this.Property(t => t.Remark).HasColumnName("Remark");
}
}

View File

@@ -1,50 +0,0 @@
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using OpenAuth.Domain;
namespace OpenAuth.Repository.Models.Mapping
{
public class PageMap : EntityTypeConfiguration<Page>
{
public PageMap()
{
// Primary Key
this.HasKey(t => t.Id);
// Properties
this.Property(t => t.Name)
.IsRequired()
.HasMaxLength(255);
this.Property(t => t.Url)
.IsRequired()
.HasMaxLength(255);
this.Property(t => t.Icon)
.IsRequired()
.HasMaxLength(255);
this.Property(t => t.IconBig)
.IsRequired()
.HasMaxLength(255);
this.Property(t => t.Vector)
.IsRequired()
.HasMaxLength(255);
// Table & Column Mappings
this.ToTable("Page");
this.Property(t => t.Id).HasColumnName("Id");
this.Property(t => t.ModuleId).HasColumnName("ModuleId");
this.Property(t => t.Name).HasColumnName("Name");
this.Property(t => t.Url).HasColumnName("Url");
this.Property(t => t.Type).HasColumnName("Type");
this.Property(t => t.Enabled).HasColumnName("Enabled");
this.Property(t => t.IsDefault).HasColumnName("IsDefault");
this.Property(t => t.Icon).HasColumnName("Icon");
this.Property(t => t.IconBig).HasColumnName("IconBig");
this.Property(t => t.Vector).HasColumnName("Vector");
this.Property(t => t.SortNo).HasColumnName("SortNo");
}
}
}