username@email.com
2022-12-30 13ca8b4cab099521fc95d551c4b21c1a7ae5984d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
 
#nullable disable
 
namespace zhengcaioa.Models
{
    public partial class zcUserInfoN_dbContext : DbContext
    {
        public zcUserInfoN_dbContext()
        {
        }
 
        public zcUserInfoN_dbContext(DbContextOptions<zcUserInfoN_dbContext> options)
            : base(options)
        {
        }
 
        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=172.26.97.147;Initial Catalog=zcUserInfoN_db;User ID=sa;Password=Za20222812");
            }
        }
 
        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.HasAnnotation("Relational:Collation", "Chinese_PRC_CI_AS");
 
            modelBuilder.Entity<GadeRole>(entity =>
            {
                entity.ToTable("gadeRoles");
 
                entity.HasIndex(e => e.FrameworkRoleId, "IX_gadeRoles_FrameworkRoleId");
 
                entity.Property(e => e.Id)
                    .ValueGeneratedNever()
                    .HasColumnName("ID");
 
                entity.Property(e => e.CreateBy).HasMaxLength(50);
 
                entity.Property(e => e.OnShelf).HasColumnName("onShelf");
 
                entity.Property(e => e.Price)
                    .HasColumnType("decimal(18, 2)")
                    .HasColumnName("price");
 
                entity.Property(e => e.UpdateBy).HasMaxLength(50);
 
                entity.Property(e => e.XiaoCaiQandA).HasColumnName("XiaoCaiQAndA");
 
                entity.Property(e => e.XiaocaiKeTang).HasColumnName("xiaocaiKeTang");
            });
 
            modelBuilder.Entity<UsergGadeRole>(entity =>
            {
                entity.ToTable("usergGadeRoles");
 
                entity.HasIndex(e => e.SecondUserGadeRolesId, "IX_usergGadeRoles_SecondUserGadeRolesId");
 
                entity.HasIndex(e => e.UserGadeRolesId, "IX_usergGadeRoles_UserGadeRolesId");
 
                entity.HasIndex(e => e.UserId, "IX_usergGadeRoles_UserId");
 
                entity.Property(e => e.Id)
                    .ValueGeneratedNever()
                    .HasColumnName("ID");
 
                entity.Property(e => e.CreateBy).HasMaxLength(50);
 
                entity.Property(e => e.UpdateBy).HasMaxLength(50);
 
                entity.HasOne(d => d.SecondUserGadeRoles)
                    .WithMany(p => p.UsergGadeRoleSecondUserGadeRoles)
                    .HasForeignKey(d => d.SecondUserGadeRolesId);
 
                entity.HasOne(d => d.UserGadeRoles)
                    .WithMany(p => p.UsergGadeRoleUserGadeRoles)
                    .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);
        }
 
        partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
    }
}