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