mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2026-02-16 21:36:29 +08:00
调整了一下项目框架与前端JS代码
This commit is contained in:
46
OpenAuth.Repository/Models/Mapping/RoleMap.cs
Normal file
46
OpenAuth.Repository/Models/Mapping/RoleMap.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using System.Data.Entity.ModelConfiguration;
|
||||
using OpenAuth.Domain;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public class RoleMap : EntityTypeConfiguration<Role>
|
||||
{
|
||||
public RoleMap()
|
||||
{
|
||||
// Primary Key
|
||||
this.HasKey(t => t.RoleId);
|
||||
|
||||
// Properties
|
||||
this.Property(t => t.RoleId)
|
||||
.IsRequired()
|
||||
.HasMaxLength(50);
|
||||
|
||||
this.Property(t => t.ParentId)
|
||||
.HasMaxLength(50);
|
||||
|
||||
this.Property(t => t.FullName)
|
||||
.HasMaxLength(50);
|
||||
|
||||
this.Property(t => t.Category)
|
||||
.HasMaxLength(50);
|
||||
|
||||
this.Property(t => t.Description)
|
||||
.HasMaxLength(50);
|
||||
|
||||
this.Property(t => t.DepartmentId)
|
||||
.HasMaxLength(50);
|
||||
|
||||
// Table & Column Mappings
|
||||
this.ToTable("Role");
|
||||
this.Property(t => t.RoleId).HasColumnName("RoleId");
|
||||
this.Property(t => t.ParentId).HasColumnName("ParentId");
|
||||
this.Property(t => t.FullName).HasColumnName("FullName");
|
||||
this.Property(t => t.Category).HasColumnName("Category");
|
||||
this.Property(t => t.Description).HasColumnName("Description");
|
||||
this.Property(t => t.Enabled).HasColumnName("Enabled");
|
||||
this.Property(t => t.SortCode).HasColumnName("SortCode");
|
||||
this.Property(t => t.DeleteMark).HasColumnName("DeleteMark");
|
||||
this.Property(t => t.DepartmentId).HasColumnName("DepartmentId");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user