using System.ComponentModel.DataAnnotations.Schema; using System.Data.Entity.ModelConfiguration; namespace YZXYH.Repository.Models.Mapping { public class ViewMedicalHelpHandleMap : EntityTypeConfiguration { public ViewMedicalHelpHandleMap() { // Primary Key this.HasKey(t => new { t.HandleId, t.HandleNo, t.HandleStatus, t.HelpNo }); // Properties this.Property(t => t.Id) .HasMaxLength(50); this.Property(t => t.HandleId) .IsRequired() .HasMaxLength(50); this.Property(t => t.ContactNoApply) .HasMaxLength(50); this.Property(t => t.RelationshipApply) .HasMaxLength(50); this.Property(t => t.IsLocked) .IsFixedLength() .HasMaxLength(1); this.Property(t => t.HandleNo) .IsRequired() .HasMaxLength(50); this.Property(t => t.HandleStatus) .IsRequired() .IsFixedLength() .HasMaxLength(1); this.Property(t => t.FileName) .HasMaxLength(500); this.Property(t => t.FileExt) .HasMaxLength(50); this.Property(t => t.FileType) .HasMaxLength(50); this.Property(t => t.HelpNo) .IsRequired() .HasMaxLength(50); this.Property(t => t.Status) .IsFixedLength() .HasMaxLength(1); this.Property(t => t.UserNameApply) .HasMaxLength(50); this.Property(t => t.UserNameReply) .HasMaxLength(50); this.Property(t => t.UserNoApply) .HasMaxLength(50); // Table & Column Mappings this.ToTable("ViewMedicalHelpHandle"); this.Property(t => t.Id).HasColumnName("Id"); this.Property(t => t.HandleId).HasColumnName("HandleId"); this.Property(t => t.Title).HasColumnName("Title"); this.Property(t => t.ContentApply).HasColumnName("ContentApply"); this.Property(t => t.ContactNoApply).HasColumnName("ContactNoApply"); this.Property(t => t.RelationshipApply).HasColumnName("RelationshipApply"); this.Property(t => t.UserNoReply).HasColumnName("UserNoReply"); this.Property(t => t.ContentReply).HasColumnName("ContentReply"); this.Property(t => t.TimeApply).HasColumnName("TimeApply"); this.Property(t => t.TimeReply).HasColumnName("TimeReply"); this.Property(t => t.TimeEnd).HasColumnName("TimeEnd"); this.Property(t => t.IsLocked).HasColumnName("IsLocked"); this.Property(t => t.HandleNo).HasColumnName("HandleNo"); this.Property(t => t.HandleStatus).HasColumnName("HandleStatus"); this.Property(t => t.Contents).HasColumnName("Contents"); this.Property(t => t.TimeHandle).HasColumnName("TimeHandle"); this.Property(t => t.FileTitle).HasColumnName("FileTitle"); this.Property(t => t.FileName).HasColumnName("FileName"); this.Property(t => t.FilePath).HasColumnName("FilePath"); this.Property(t => t.Description).HasColumnName("Description"); this.Property(t => t.FileExt).HasColumnName("FileExt"); this.Property(t => t.FileType).HasColumnName("FileType"); this.Property(t => t.HelpNo).HasColumnName("HelpNo"); this.Property(t => t.Status).HasColumnName("Status"); this.Property(t => t.UserNameApply).HasColumnName("UserNameApply"); this.Property(t => t.UserNameReply).HasColumnName("UserNameReply"); this.Property(t => t.UserNoApply).HasColumnName("UserNoApply"); } } }