mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-20 18:47:55 +08:00
调整数据库菜单表结构,可以动态加载按钮,注意更新数据库结构并重新初始化数据库
This commit is contained in:
@@ -1,35 +1,35 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Data.Entity.ModelConfiguration;
|
||||
using OpenAuth.Domain;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public class RelevanceMap : EntityTypeConfiguration<Relevance>
|
||||
{
|
||||
public RelevanceMap()
|
||||
{
|
||||
// Primary Key
|
||||
this.HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
this.Property(t => t.Description)
|
||||
.IsRequired()
|
||||
.HasMaxLength(100);
|
||||
|
||||
this.Property(t => t.Key)
|
||||
.IsRequired()
|
||||
.HasMaxLength(100);
|
||||
|
||||
// Table & Column Mappings
|
||||
this.ToTable("Relevance");
|
||||
this.Property(t => t.Id).HasColumnName("Id");
|
||||
this.Property(t => t.FirstId).HasColumnName("FirstId");
|
||||
this.Property(t => t.SecondId).HasColumnName("SecondId");
|
||||
this.Property(t => t.Description).HasColumnName("Description");
|
||||
this.Property(t => t.Key).HasColumnName("Key");
|
||||
this.Property(t => t.Status).HasColumnName("Status");
|
||||
this.Property(t => t.OperateTime).HasColumnName("OperateTime");
|
||||
this.Property(t => t.OperatorId).HasColumnName("OperatorId");
|
||||
}
|
||||
}
|
||||
}
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Data.Entity.ModelConfiguration;
|
||||
using OpenAuth.Domain;
|
||||
|
||||
namespace OpenAuth.Repository.Models.Mapping
|
||||
{
|
||||
public class RelevanceMap : EntityTypeConfiguration<Relevance>
|
||||
{
|
||||
public RelevanceMap()
|
||||
{
|
||||
// Primary Key
|
||||
this.HasKey(t => t.Id);
|
||||
|
||||
// Properties
|
||||
this.Property(t => t.Description)
|
||||
.IsRequired()
|
||||
.HasMaxLength(100);
|
||||
|
||||
this.Property(t => t.Key)
|
||||
.IsRequired()
|
||||
.HasMaxLength(100);
|
||||
|
||||
// Table & Column Mappings
|
||||
this.ToTable("Relevance");
|
||||
this.Property(t => t.Id).HasColumnName("Id");
|
||||
this.Property(t => t.FirstId).HasColumnName("FirstId");
|
||||
this.Property(t => t.SecondId).HasColumnName("SecondId");
|
||||
this.Property(t => t.Description).HasColumnName("Description");
|
||||
this.Property(t => t.Key).HasColumnName("Key");
|
||||
this.Property(t => t.Status).HasColumnName("Status");
|
||||
this.Property(t => t.OperateTime).HasColumnName("OperateTime");
|
||||
this.Property(t => t.OperatorId).HasColumnName("OperatorId");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user