ViewMedicalHelpHandleMap.cs 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. using System.ComponentModel.DataAnnotations.Schema;
  2. using System.Data.Entity.ModelConfiguration;
  3. namespace YZXYH.Repository.Models.Mapping
  4. {
  5. public class ViewMedicalHelpHandleMap : EntityTypeConfiguration<ViewMedicalHelpHandle>
  6. {
  7. public ViewMedicalHelpHandleMap()
  8. {
  9. // Primary Key
  10. this.HasKey(t => new { t.HandleId, t.HandleNo, t.HandleStatus, t.HelpNo });
  11. // Properties
  12. this.Property(t => t.Id)
  13. .HasMaxLength(50);
  14. this.Property(t => t.HandleId)
  15. .IsRequired()
  16. .HasMaxLength(50);
  17. this.Property(t => t.ContactNoApply)
  18. .HasMaxLength(50);
  19. this.Property(t => t.RelationshipApply)
  20. .HasMaxLength(50);
  21. this.Property(t => t.IsLocked)
  22. .IsFixedLength()
  23. .HasMaxLength(1);
  24. this.Property(t => t.HandleNo)
  25. .IsRequired()
  26. .HasMaxLength(50);
  27. this.Property(t => t.HandleStatus)
  28. .IsRequired()
  29. .IsFixedLength()
  30. .HasMaxLength(1);
  31. this.Property(t => t.FileName)
  32. .HasMaxLength(500);
  33. this.Property(t => t.FileExt)
  34. .HasMaxLength(50);
  35. this.Property(t => t.FileType)
  36. .HasMaxLength(50);
  37. this.Property(t => t.HelpNo)
  38. .IsRequired()
  39. .HasMaxLength(50);
  40. this.Property(t => t.Status)
  41. .IsFixedLength()
  42. .HasMaxLength(1);
  43. this.Property(t => t.UserNameApply)
  44. .HasMaxLength(50);
  45. this.Property(t => t.UserNameReply)
  46. .HasMaxLength(50);
  47. this.Property(t => t.UserNoApply)
  48. .HasMaxLength(50);
  49. // Table & Column Mappings
  50. this.ToTable("ViewMedicalHelpHandle");
  51. this.Property(t => t.Id).HasColumnName("Id");
  52. this.Property(t => t.HandleId).HasColumnName("HandleId");
  53. this.Property(t => t.Title).HasColumnName("Title");
  54. this.Property(t => t.ContentApply).HasColumnName("ContentApply");
  55. this.Property(t => t.ContactNoApply).HasColumnName("ContactNoApply");
  56. this.Property(t => t.RelationshipApply).HasColumnName("RelationshipApply");
  57. this.Property(t => t.UserNoReply).HasColumnName("UserNoReply");
  58. this.Property(t => t.ContentReply).HasColumnName("ContentReply");
  59. this.Property(t => t.TimeApply).HasColumnName("TimeApply");
  60. this.Property(t => t.TimeReply).HasColumnName("TimeReply");
  61. this.Property(t => t.TimeEnd).HasColumnName("TimeEnd");
  62. this.Property(t => t.IsLocked).HasColumnName("IsLocked");
  63. this.Property(t => t.HandleNo).HasColumnName("HandleNo");
  64. this.Property(t => t.HandleStatus).HasColumnName("HandleStatus");
  65. this.Property(t => t.Contents).HasColumnName("Contents");
  66. this.Property(t => t.TimeHandle).HasColumnName("TimeHandle");
  67. this.Property(t => t.FileTitle).HasColumnName("FileTitle");
  68. this.Property(t => t.FileName).HasColumnName("FileName");
  69. this.Property(t => t.FilePath).HasColumnName("FilePath");
  70. this.Property(t => t.Description).HasColumnName("Description");
  71. this.Property(t => t.FileExt).HasColumnName("FileExt");
  72. this.Property(t => t.FileType).HasColumnName("FileType");
  73. this.Property(t => t.HelpNo).HasColumnName("HelpNo");
  74. this.Property(t => t.Status).HasColumnName("Status");
  75. this.Property(t => t.UserNameApply).HasColumnName("UserNameApply");
  76. this.Property(t => t.UserNameReply).HasColumnName("UserNameReply");
  77. this.Property(t => t.UserNoApply).HasColumnName("UserNoApply");
  78. }
  79. }
  80. }