username@email.com
2022-12-26 21d415aeaaa4de2cee01a146ad982fa8f47da2b1
zhengcaioa/Model/zcUserInfoN_db/zcUserInfoN_dbContext.cs
@@ -19,13 +19,14 @@
        public virtual DbSet<GadeRole> GadeRoles { get; set; }
        public virtual DbSet<UsergGadeRole> UsergGadeRoles { get; set; }
        public virtual DbSet<FrameworkUser> FrameworkUsers { get; set; }
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            if (!optionsBuilder.IsConfigured)
            {
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see http://go.microsoft.com/fwlink/?LinkId=723263.
                optionsBuilder.UseSqlServer("Data Source=.;Initial Catalog=zcUserInfoN_db;User ID=sa;Password=123456");
                optionsBuilder.UseSqlServer("Data Source=172.26.97.147;Initial Catalog=zcUserInfoN_db;User ID=sa;Password=Za20222812");
            }
        }
@@ -85,6 +86,42 @@
                    .HasForeignKey(d => d.UserGadeRolesId);
            });
            modelBuilder.Entity<FrameworkUser>(entity =>
            {
                entity.HasIndex(e => e.PhotoId, "IX_FrameworkUsers_PhotoId");
                entity.Property(e => e.Id)
                    .ValueGeneratedNever()
                    .HasColumnName("ID");
                entity.Property(e => e.Address).HasMaxLength(200);
                entity.Property(e => e.Agent).HasComment("是否时代理商?0 为普通客户 1为代理商");
                entity.Property(e => e.CreateBy).HasMaxLength(50);
                entity.Property(e => e.Email).HasMaxLength(50);
                entity.Property(e => e.HomePhone).HasMaxLength(30);
                entity.Property(e => e.Itcode)
                    .IsRequired()
                    .HasMaxLength(50)
                    .HasColumnName("ITCode");
                entity.Property(e => e.Name)
                    .IsRequired()
                    .HasMaxLength(50);
                entity.Property(e => e.Password)
                    .IsRequired()
                    .HasMaxLength(32);
                entity.Property(e => e.UpdateBy).HasMaxLength(50);
                entity.Property(e => e.WxOpenid).HasMaxLength(50);
            });
            OnModelCreatingPartial(modelBuilder);
        }