mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2026-02-17 13:49:28 +08:00
采用全新的数据库架构
This commit is contained in:
27
OpenAuth.Repository/Models/Mapping/UserOrgMap.cs
Normal file
27
OpenAuth.Repository/Models/Mapping/UserOrgMap.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Data.Entity.ModelConfiguration;
|
||||
using OpenAuth.Domain;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public class UserOrgMap : EntityTypeConfiguration<UserOrg>
|
||||
{
|
||||
public UserOrgMap()
|
||||
{
|
||||
// Primary Key
|
||||
this.HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
this.Property(t => t.Id)
|
||||
.HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);
|
||||
|
||||
// Table & Column Mappings
|
||||
this.ToTable("UserOrg");
|
||||
this.Property(t => t.Id).HasColumnName("Id");
|
||||
this.Property(t => t.OrgId).HasColumnName("OrgId");
|
||||
this.Property(t => t.UserId).HasColumnName("UserId");
|
||||
this.Property(t => t.OperateTime).HasColumnName("OperateTime");
|
||||
this.Property(t => t.OperatorId).HasColumnName("OperatorId");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user