| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- using System.ComponentModel.DataAnnotations.Schema;
- using System.Data.Entity.ModelConfiguration;
- namespace YZXYH.Repository.Models.Mapping
- {
- public class QuestionnaireItemMap : EntityTypeConfiguration<QuestionnaireItem>
- {
- public QuestionnaireItemMap()
- {
- // Primary Key
- this.HasKey(t => t.Id);
- // Properties
- this.Property(t => t.Id)
- .IsRequired()
- .HasMaxLength(32);
- this.Property(t => t.QuestionnaireNo)
- .IsRequired()
- .HasMaxLength(32);
- this.Property(t => t.QuestionnaireTitle)
- .IsRequired()
- .HasMaxLength(150);
- this.Property(t => t.FullName)
- .IsRequired()
- .HasMaxLength(50);
- this.Property(t => t.Gender)
- .IsRequired();
- this.Property(t => t.GraduationYear)
- .IsRequired();
- this.Property(t => t.Class1)
- .HasMaxLength(10);
- this.Property(t => t.Headmaster)
- .HasMaxLength(50);
- this.Property(t => t.Profession)
- .HasMaxLength(50);
- this.Property(t => t.WorkUnit)
- .HasMaxLength(50);
- this.Property(t => t.Duties)
- .HasMaxLength(30);
- this.Property(t => t.Industry)
- .HasMaxLength(50);
- this.Property(t => t.WorkUnitAddress)
- .HasMaxLength(500);
- this.Property(t => t.FamilyAddress)
- .HasMaxLength(500);
- this.Property(t => t.Speciality)
- .HasMaxLength(100);
- this.Property(t => t.Hobby)
- .HasMaxLength(100);
- this.Property(t => t.QQ)
- .HasMaxLength(20);
- this.Property(t => t.WeChat)
- .HasMaxLength(30);
- this.Property(t => t.PhoneNumber)
- .HasMaxLength(20);
- this.Property(t => t.Email)
- .HasMaxLength(50);
- this.Property(t => t.Remark)
- .HasMaxLength(500);
- // Table & Column Mappings
- this.ToTable("QuestionnaireItems");
-
- }
- }
- }
|