mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2026-02-16 05:16:25 +08:00
initial
This commit is contained in:
49
OpenAuth.Infrastructure/Mapping/ButtonMap.cs
Normal file
49
OpenAuth.Infrastructure/Mapping/ButtonMap.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using System.Data.Entity.ModelConfiguration;
|
||||
using OpenAuth.Domain;
|
||||
|
||||
namespace OpenAuth.Infrastructure.Mapping
|
||||
{
|
||||
public class ButtonMap : EntityTypeConfiguration<Button>
|
||||
{
|
||||
public ButtonMap()
|
||||
{
|
||||
// Primary Key
|
||||
this.HasKey(t => t.ButtonId);
|
||||
|
||||
// Properties
|
||||
this.Property(t => t.ButtonId)
|
||||
.IsRequired()
|
||||
.HasMaxLength(50);
|
||||
|
||||
this.Property(t => t.FullName)
|
||||
.HasMaxLength(50);
|
||||
|
||||
this.Property(t => t.Img)
|
||||
.HasMaxLength(50);
|
||||
|
||||
this.Property(t => t.Event)
|
||||
.HasMaxLength(200);
|
||||
|
||||
this.Property(t => t.Control_ID)
|
||||
.HasMaxLength(50);
|
||||
|
||||
this.Property(t => t.Category)
|
||||
.HasMaxLength(50);
|
||||
|
||||
this.Property(t => t.Description)
|
||||
.HasMaxLength(200);
|
||||
|
||||
// Table & Column Mappings
|
||||
this.ToTable("Button");
|
||||
this.Property(t => t.ButtonId).HasColumnName("ButtonId");
|
||||
this.Property(t => t.FullName).HasColumnName("FullName");
|
||||
this.Property(t => t.Img).HasColumnName("Img");
|
||||
this.Property(t => t.Event).HasColumnName("Event");
|
||||
this.Property(t => t.Control_ID).HasColumnName("Control_ID");
|
||||
this.Property(t => t.Category).HasColumnName("Category");
|
||||
this.Property(t => t.Description).HasColumnName("Description");
|
||||
this.Property(t => t.Enabled).HasColumnName("Enabled");
|
||||
this.Property(t => t.SortCode).HasColumnName("SortCode");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user