| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- using System.ComponentModel.DataAnnotations.Schema;
- using System.Data.Entity.ModelConfiguration;
- namespace YZXYH.Repository.Models.Mapping
- {
- public class MedicalHelpMap : EntityTypeConfiguration<MedicalHelp>
- {
- public MedicalHelpMap()
- {
- // Primary Key
- this.HasKey(t => t.Id);
- // Properties
- this.Property(t => t.Id)
- .IsRequired()
- .HasMaxLength(50);
- this.Property(t => t.UserNoApply)
- .IsRequired()
- .HasMaxLength(50);
- this.Property(t => t.Title)
- .IsRequired();
- this.Property(t => t.ContentApply)
- .IsRequired();
- this.Property(t => t.Status)
- .IsRequired()
- .IsFixedLength()
- .HasMaxLength(1);
- this.Property(t => t.ContactNoApply)
- .HasMaxLength(50);
- this.Property(t => t.RelationshipApply)
- .HasMaxLength(50);
- this.Property(t => t.IsLocked)
- .IsRequired()
- .IsFixedLength()
- .HasMaxLength(1);
- this.Property(t => t.AttachFileNo)
- .HasMaxLength(50);
- // Table & Column Mappings
- this.ToTable("MedicalHelp");
- this.Property(t => t.Id).HasColumnName("Id");
- this.Property(t => t.UserNoApply).HasColumnName("UserNoApply");
- this.Property(t => t.Title).HasColumnName("Title");
- this.Property(t => t.ContentApply).HasColumnName("ContentApply");
- this.Property(t => t.Status).HasColumnName("Status");
- 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.AttachFileNo).HasColumnName("AttachFileNo");
- }
- }
- }
|