View_SysUserLastLoginTimeMap.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. using System.ComponentModel.DataAnnotations.Schema;
  2. using System.Data.Entity.ModelConfiguration;
  3. namespace YZXYH.Repository.Models.Mapping
  4. {
  5. public class View_SysUserLastLoginTimeMap : EntityTypeConfiguration<View_SysUserLastLoginTime>
  6. {
  7. public View_SysUserLastLoginTimeMap()
  8. {
  9. // Primary Key
  10. this.HasKey(t => new { t.UserNo, t.SysName, t.SysNo });
  11. // Properties
  12. this.Property(t => t.UserNo)
  13. .IsRequired()
  14. .HasMaxLength(50);
  15. this.Property(t => t.SysName)
  16. .IsRequired()
  17. .HasMaxLength(50);
  18. this.Property(t => t.SysNo)
  19. .IsRequired()
  20. .HasMaxLength(50);
  21. // Table & Column Mappings
  22. this.ToTable("View_SysUserLastLoginTime");
  23. this.Property(t => t.UserNo).HasColumnName("UserNo");
  24. this.Property(t => t.TimeLastLogin).HasColumnName("TimeLastLogin");
  25. this.Property(t => t.SysName).HasColumnName("SysName");
  26. this.Property(t => t.SysNo).HasColumnName("SysNo");
  27. }
  28. }
  29. }