| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- using System.ComponentModel.DataAnnotations.Schema;
- using System.Data.Entity.ModelConfiguration;
- namespace YZXYH.Repository.Models.Mapping
- {
- public class AlumniChapterUserMap : EntityTypeConfiguration<AlumniChapterUser>
- {
- public AlumniChapterUserMap()
- {
- // Primary Key
- this.HasKey(t => t.Id);
- // Properties
- this.Property(t => t.Id)
- .IsRequired()
- .HasMaxLength(50);
- this.Property(t => t.AlumniChapterNo)
- .IsRequired()
- .HasMaxLength(50);
- this.Property(t => t.UserNo)
- .IsRequired()
- .HasMaxLength(50);
- this.Property(t => t.UserRole)
- .HasMaxLength(50);
- this.Property(t => t.Duty)
- .HasMaxLength(50);
- this.Property(t => t.IsActive)
- .IsFixedLength()
- .HasMaxLength(1);
- this.Property(t => t.IsMember)
- .IsFixedLength()
- .HasMaxLength(1);
- this.Property(t => t.IsLocked)
- .IsRequired()
- .IsFixedLength()
- .HasMaxLength(1);
- this.Property(t => t.SortNo)
- .IsFixedLength()
- .HasMaxLength(4);
- // Table & Column Mappings
- this.ToTable("AlumniChapterUsers");
- this.Property(t => t.Id).HasColumnName("Id");
- this.Property(t => t.AlumniChapterNo).HasColumnName("AlumniChapterNo");
- this.Property(t => t.UserNo).HasColumnName("UserNo");
- this.Property(t => t.UserRole).HasColumnName("UserRole");
- this.Property(t => t.Duty).HasColumnName("Duty");
- this.Property(t => t.IsActive).HasColumnName("IsActive");
- this.Property(t => t.IsMember).HasColumnName("IsMember");
- this.Property(t => t.IsLocked).HasColumnName("IsLocked");
- this.Property(t => t.SortNo).HasColumnName("SortNo");
- this.Property(t => t.TimeCreate).HasColumnName("TimeCreate");
- }
- }
- }
|