View_UserLastLoginTimeMap.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_UserLastLoginTimeMap : EntityTypeConfiguration<View_UserLastLoginTime>
  6. {
  7. public View_UserLastLoginTimeMap()
  8. {
  9. // Primary Key
  10. this.HasKey(t => new { t.UserNo, t.Name, t.Mobile });
  11. // Properties
  12. this.Property(t => t.UserNo)
  13. .IsRequired()
  14. .HasMaxLength(50);
  15. this.Property(t => t.Name)
  16. .IsRequired()
  17. .HasMaxLength(50);
  18. this.Property(t => t.Mobile)
  19. .IsRequired()
  20. .HasMaxLength(15);
  21. // Table & Column Mappings
  22. this.ToTable("View_UserLastLoginTime");
  23. this.Property(t => t.UserNo).HasColumnName("UserNo");
  24. this.Property(t => t.TimeLastLogin).HasColumnName("TimeLastLogin");
  25. this.Property(t => t.Name).HasColumnName("Name");
  26. this.Property(t => t.Mobile).HasColumnName("Mobile");
  27. }
  28. }
  29. }