mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-05-10 23:58:02 +08:00
39 lines
1.3 KiB
C#
39 lines
1.3 KiB
C#
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Data.Entity.ModelConfiguration;
|
|
using OpenAuth.Domain;
|
|
|
|
namespace OpenAuth.Repository.Models.Mapping
|
|
{
|
|
public class DicDetailMap : EntityTypeConfiguration<DicDetail>
|
|
{
|
|
public DicDetailMap()
|
|
{
|
|
// Primary Key
|
|
this.HasKey(t => t.Id);
|
|
|
|
// Properties
|
|
this.Property(t => t.Value)
|
|
.IsRequired()
|
|
.HasMaxLength(100);
|
|
|
|
this.Property(t => t.Text)
|
|
.IsRequired()
|
|
.HasMaxLength(100);
|
|
|
|
this.Property(t => t.Description)
|
|
.IsRequired()
|
|
.HasMaxLength(100);
|
|
|
|
// Table & Column Mappings
|
|
this.ToTable("DicDetail");
|
|
this.Property(t => t.Id).HasColumnName("Id");
|
|
this.Property(t => t.Value).HasColumnName("Value");
|
|
this.Property(t => t.Text).HasColumnName("Text");
|
|
this.Property(t => t.DicId).HasColumnName("DicId");
|
|
this.Property(t => t.SortNo).HasColumnName("SortNo");
|
|
this.Property(t => t.Status).HasColumnName("Status");
|
|
this.Property(t => t.Description).HasColumnName("Description");
|
|
}
|
|
}
|
|
}
|