ViewUserAttendMeetInfoMap.cs 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. using System.ComponentModel.DataAnnotations.Schema;
  2. using System.Data.Entity.ModelConfiguration;
  3. namespace YZXYH.Repository.Models.Mapping
  4. {
  5. public class ViewUserAttendMeetInfoMap : EntityTypeConfiguration<ViewUserAttendMeetInfo>
  6. {
  7. public ViewUserAttendMeetInfoMap()
  8. {
  9. // Primary Key
  10. this.HasKey(t => new { t.Id, t.AlumnusNo, t.AMNo, t.IsAudit, t.IsLocked, t.IsCost, t.IsBranch });
  11. // Properties
  12. this.Property(t => t.Id)
  13. .IsRequired()
  14. .HasMaxLength(50);
  15. this.Property(t => t.AlumnusNo)
  16. .IsRequired()
  17. .HasMaxLength(50);
  18. this.Property(t => t.AMNo)
  19. .IsRequired()
  20. .HasMaxLength(50);
  21. this.Property(t => t.IsAudit)
  22. .IsRequired()
  23. .IsFixedLength()
  24. .HasMaxLength(1);
  25. this.Property(t => t.IsLocked)
  26. .IsRequired()
  27. .IsFixedLength()
  28. .HasMaxLength(1);
  29. this.Property(t => t.IsCost)
  30. .IsRequired()
  31. .IsFixedLength()
  32. .HasMaxLength(1);
  33. this.Property(t => t.IsBranch)
  34. .IsRequired()
  35. .IsFixedLength()
  36. .HasMaxLength(1);
  37. this.Property(t => t.IsVip)
  38. .IsFixedLength()
  39. .HasMaxLength(1);
  40. this.Property(t => t.Name)
  41. .HasMaxLength(50);
  42. this.Property(t => t.Mobile)
  43. .HasMaxLength(15);
  44. this.Property(t => t.GraduationYear)
  45. .IsFixedLength()
  46. .HasMaxLength(4);
  47. this.Property(t => t.AMName)
  48. .HasMaxLength(100);
  49. this.Property(t => t.AMYear)
  50. .IsFixedLength()
  51. .HasMaxLength(4);
  52. this.Property(t => t.AMDate)
  53. .HasMaxLength(50);
  54. this.Property(t => t.Stauts)
  55. .IsFixedLength()
  56. .HasMaxLength(1);
  57. // Table & Column Mappings
  58. this.ToTable("ViewUserAttendMeetInfos");
  59. this.Property(t => t.Id).HasColumnName("Id");
  60. this.Property(t => t.AlumnusNo).HasColumnName("AlumnusNo");
  61. this.Property(t => t.AMNo).HasColumnName("AMNo");
  62. this.Property(t => t.Suggest).HasColumnName("Suggest");
  63. this.Property(t => t.IsAudit).HasColumnName("IsAudit");
  64. this.Property(t => t.IsLocked).HasColumnName("IsLocked");
  65. this.Property(t => t.IsCost).HasColumnName("IsCost");
  66. this.Property(t => t.IsBranch).HasColumnName("IsBranch");
  67. this.Property(t => t.CostTime).HasColumnName("CostTime");
  68. this.Property(t => t.IsVip).HasColumnName("IsVip");
  69. this.Property(t => t.Remark).HasColumnName("Remark");
  70. this.Property(t => t.TimeCreated).HasColumnName("TimeCreated");
  71. this.Property(t => t.TimeModify).HasColumnName("TimeModify");
  72. this.Property(t => t.Name).HasColumnName("Name");
  73. this.Property(t => t.Mobile).HasColumnName("Mobile");
  74. this.Property(t => t.GraduationYear).HasColumnName("GraduationYear");
  75. this.Property(t => t.AMName).HasColumnName("AMName");
  76. this.Property(t => t.AMYear).HasColumnName("AMYear");
  77. this.Property(t => t.AMDate).HasColumnName("AMDate");
  78. this.Property(t => t.Stauts).HasColumnName("Stauts");
  79. this.Property(t => t.TimeEnd).HasColumnName("TimeEnd");
  80. }
  81. }
  82. }