| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using System.ComponentModel.DataAnnotations.Schema;
- using System.Data.Entity.ModelConfiguration;
- namespace YZXYH.Repository.Models.Mapping
- {
- public class MedicalHelpHandleMap : EntityTypeConfiguration<MedicalHelpHandle>
- {
- public MedicalHelpHandleMap()
- {
- // Primary Key
- this.HasKey(t => t.Id);
- // Properties
- this.Property(t => t.Id)
- .IsRequired()
- .HasMaxLength(50);
- this.Property(t => t.HelpNo)
- .IsRequired()
- .HasMaxLength(50);
- this.Property(t => t.HandleNo)
- .IsRequired()
- .HasMaxLength(50);
- this.Property(t => t.Status)
- .IsRequired()
- .IsFixedLength()
- .HasMaxLength(1);
- // Table & Column Mappings
- this.ToTable("MedicalHelpHandle");
- this.Property(t => t.Id).HasColumnName("Id");
- this.Property(t => t.HelpNo).HasColumnName("HelpNo");
- this.Property(t => t.HandleNo).HasColumnName("HandleNo");
- this.Property(t => t.Contents).HasColumnName("Contents");
- this.Property(t => t.Status).HasColumnName("Status");
- this.Property(t => t.TimeHandle).HasColumnName("TimeHandle");
- }
- }
- }
|