username@email.com
2022-12-30 13ca8b4cab099521fc95d551c4b21c1a7ae5984d
zhengcaioa/Model/zcUserInfoN_db/zcUserInfoN_dbContext.cs
@@ -19,13 +19,16 @@
        public virtual DbSet<GadeRole> GadeRoles { get; set; }
        public virtual DbSet<UsergGadeRole> UsergGadeRoles { get; set; }
        public virtual DbSet<FrameworkUser> FrameworkUsers { get; set; }
        public virtual DbSet<FrameworkRole> FrameworkRoles { get; set; }
        public virtual DbSet<OderOfVip> OderOfVips { 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 +88,88 @@
                    .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);
            });
            modelBuilder.Entity<FrameworkRole>(entity =>
            {
                entity.Property(e => e.Id)
                    .ValueGeneratedNever()
                    .HasColumnName("ID");
                entity.Property(e => e.CreateBy).HasMaxLength(50);
                entity.Property(e => e.RoleCode).HasMaxLength(100);
                entity.Property(e => e.RoleName)
                    .IsRequired()
                    .HasMaxLength(50);
                entity.Property(e => e.UpdateBy).HasMaxLength(50);
            });
            modelBuilder.Entity<OderOfVip>(entity =>
            {
                entity.ToTable("oderOfVIPs");
                entity.Property(e => e.Id)
                    .ValueGeneratedNever()
                    .HasColumnName("ID");
                entity.Property(e => e.Amout).HasColumnType("decimal(18, 2)");
                entity.Property(e => e.CreateBy).HasMaxLength(50);
                entity.Property(e => e.IsPayEnd).HasColumnName("isPayEND");
                entity.Property(e => e.PayId).HasColumnName("PayID");
                entity.Property(e => e.PayMoney).HasColumnType("decimal(18, 2)");
                entity.Property(e => e.Paytype).HasColumnName("paytype");
                entity.Property(e => e.RoleId).HasColumnName("RoleID");
                entity.Property(e => e.UpdateBy).HasMaxLength(50);
                entity.Property(e => e.UserId).HasColumnName("UserID");
                entity.Property(e => e.ViPrenewType).HasColumnName("viPrenewType");
            });
            OnModelCreatingPartial(modelBuilder);
        }