| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- using System.ComponentModel.DataAnnotations.Schema;
- using System.Data.Entity.ModelConfiguration;
- namespace YZXYH.Repository.Models.Mapping
- {
- public class SysAttachFileMap : EntityTypeConfiguration<SysAttachFile>
- {
- public SysAttachFileMap()
- {
- // Primary Key
- this.HasKey(t => t.Id);
- // Properties
- this.Property(t => t.Id)
- .IsRequired()
- .HasMaxLength(50);
- this.Property(t => t.FileName)
- .IsRequired()
- .HasMaxLength(500);
- this.Property(t => t.FilePath)
- .IsRequired();
- this.Property(t => t.FileType)
- .HasMaxLength(50);
- this.Property(t => t.FileExt)
- .HasMaxLength(50);
- // Table & Column Mappings
- this.ToTable("SysAttachFile");
- this.Property(t => t.Id).HasColumnName("Id");
- this.Property(t => t.FileTitle).HasColumnName("FileTitle");
- this.Property(t => t.FileName).HasColumnName("FileName");
- this.Property(t => t.FilePath).HasColumnName("FilePath");
- this.Property(t => t.FileType).HasColumnName("FileType");
- this.Property(t => t.FileExt).HasColumnName("FileExt");
- this.Property(t => t.Description).HasColumnName("Description");
- }
- }
- }
|