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