123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644 |
- using System;
- using Microsoft.EntityFrameworkCore;
- using Microsoft.EntityFrameworkCore.Metadata;
- namespace MySystem.Models.Push
- {
- public partial class WebCMSEntities : DbContext
- {
- public WebCMSEntities()
- {
- }
- public WebCMSEntities(DbContextOptions<WebCMSEntities> options)
- : base(options)
- {
- }
- public virtual DbSet<Merchant> Merchant { get; set; }
- public virtual DbSet<PushObj> PushObj { get; set; }
- public virtual DbSet<PushObjCondition> PushObjCondition { get; set; }
- public virtual DbSet<PushPosRecord> PushPosRecord { get; set; }
- public virtual DbSet<PushRecord> PushRecord { get; set; }
- public virtual DbSet<RePushQueue> RePushQueue { get; set; }
- public virtual DbSet<SourceCondition> SourceCondition { get; set; }
- public virtual DbSet<SourceData> SourceData { get; set; }
- public virtual DbSet<SourceDataSubTable> SourceDataSubTable { get; set; }
- protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
- {
- if (!optionsBuilder.IsConfigured)
- {
- optionsBuilder.UseMySql(Library.ConfigurationManager.AppSettings["SqlConnStr"].ToString(), x => x.ServerVersion("5.7.17-mysql"));
- }
- }
- protected override void OnModelCreating(ModelBuilder modelBuilder)
- {
- modelBuilder.Entity<Merchant>(entity =>
- {
- entity.ToTable("merchant");
- entity.HasComment("商户表");
- entity.Property(e => e.Id)
- .HasColumnName("id")
- .HasColumnType("int(11)");
- entity.Property(e => e.AesSecret)
- .HasColumnName("aes_secret")
- .HasColumnType("varchar(50)")
- .HasComment("AES密钥")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.CreateDate)
- .HasColumnName("create_date")
- .HasColumnType("datetime")
- .HasComment("创建时间");
- entity.Property(e => e.MerchantName)
- .HasColumnName("merchant_name")
- .HasColumnType("varchar(50)")
- .HasComment("商户名称")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.MerchantNo)
- .HasColumnName("merchant_no")
- .HasColumnType("varchar(50)")
- .HasComment("商户号")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.RsaPriKey)
- .HasColumnName("rsa_pri_key")
- .HasColumnType("mediumtext")
- .HasComment("RSA私钥")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.RsaPubKey)
- .HasColumnName("rsa_pub_key")
- .HasColumnType("mediumtext")
- .HasComment("RSA公钥")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.Sort)
- .HasColumnName("sort")
- .HasColumnType("int(11)")
- .HasComment("排序序号");
- entity.Property(e => e.Status)
- .HasColumnName("status")
- .HasColumnType("int(11)")
- .HasComment("状态");
- entity.Property(e => e.UpdateDate)
- .HasColumnName("update_date")
- .HasColumnType("datetime")
- .HasComment("修改时间");
- entity.Property(e => e.Version)
- .HasColumnName("version")
- .HasColumnType("int(11)")
- .HasComment("版本号");
- });
- modelBuilder.Entity<PushObj>(entity =>
- {
- entity.ToTable("push_obj");
- entity.HasComment("推送项目");
- entity.Property(e => e.Id)
- .HasColumnName("id")
- .HasColumnType("int(11)");
- entity.Property(e => e.CreateDate)
- .HasColumnName("create_date")
- .HasColumnType("datetime")
- .HasComment("创建时间");
- entity.Property(e => e.EncryptMode)
- .HasColumnName("encrypt_mode")
- .HasColumnType("int(11)")
- .HasComment("加密方式");
- entity.Property(e => e.FieldList)
- .HasColumnName("field_list")
- .HasColumnType("mediumtext")
- .HasComment("数据字段")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.MerchantId)
- .HasColumnName("merchant_id")
- .HasColumnType("int(11)")
- .HasComment("商户");
- entity.Property(e => e.NoticeUrl)
- .HasColumnName("notice_url")
- .HasColumnType("varchar(500)")
- .HasComment("推送地址")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.QueryId)
- .HasColumnType("int(11)")
- .HasComment("查询表Id");
- entity.Property(e => e.Sort)
- .HasColumnName("sort")
- .HasColumnType("int(11)")
- .HasComment("排序序号");
- entity.Property(e => e.Status)
- .HasColumnName("status")
- .HasColumnType("int(11)")
- .HasComment("状态");
- entity.Property(e => e.TableName)
- .HasColumnName("table_name")
- .HasColumnType("varchar(50)")
- .HasComment("数据表名")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.Title)
- .HasColumnName("title")
- .HasColumnType("varchar(50)")
- .HasComment("标题说明")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.UpdateDate)
- .HasColumnName("update_date")
- .HasColumnType("datetime")
- .HasComment("修改时间");
- entity.Property(e => e.Version)
- .HasColumnName("version")
- .HasColumnType("int(11)")
- .HasComment("版本号");
- });
- modelBuilder.Entity<PushObjCondition>(entity =>
- {
- entity.ToTable("push_obj_condition");
- entity.HasComment("推送数据抓取条件");
- entity.Property(e => e.Id).HasColumnType("int(11)");
- entity.Property(e => e.CreateDate)
- .HasColumnType("datetime")
- .HasComment("创建时间");
- entity.Property(e => e.CreateMan)
- .HasColumnType("varchar(50)")
- .HasComment("创建人")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.PushObjId)
- .HasColumnName("push_obj_id")
- .HasColumnType("int(11)")
- .HasComment("推送项目");
- entity.Property(e => e.QueryCondition)
- .HasColumnName("query_condition")
- .HasColumnType("int(11)")
- .HasComment("查询条件");
- entity.Property(e => e.QueryCount)
- .HasColumnType("int(11)")
- .HasComment("点击量");
- entity.Property(e => e.QueryField)
- .HasColumnName("query_field")
- .HasColumnType("varchar(50)")
- .HasComment("查询字段")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.QueryVal)
- .HasColumnName("query_val")
- .HasColumnType("varchar(50)")
- .HasComment("查询值")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.SeoDescription)
- .HasColumnType("varchar(500)")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.SeoKeyword)
- .HasColumnType("varchar(200)")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.SeoTitle)
- .HasColumnType("varchar(100)")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.Sort)
- .HasColumnType("int(11)")
- .HasComment("排序序号");
- entity.Property(e => e.Status)
- .HasColumnType("int(11)")
- .HasComment("状态");
- entity.Property(e => e.UpdateDate)
- .HasColumnType("datetime")
- .HasComment("更新时间");
- entity.Property(e => e.UpdateMan)
- .HasColumnType("varchar(50)")
- .HasComment("更新人")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.Version)
- .HasColumnType("int(11)")
- .HasComment("版本号");
- });
- modelBuilder.Entity<PushPosRecord>(entity =>
- {
- entity.ToTable("push_pos_record");
- entity.HasComment("推送项目");
- entity.Property(e => e.Id)
- .HasColumnName("id")
- .HasColumnType("int(11)");
- entity.Property(e => e.Content)
- .HasColumnName("content")
- .HasColumnType("mediumtext")
- .HasComment("数据内容")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.CreateDate)
- .HasColumnName("create_date")
- .HasColumnType("datetime")
- .HasComment("创建时间");
- entity.Property(e => e.DataType)
- .HasColumnName("data_type")
- .HasColumnType("varchar(20)")
- .HasComment("数据类型")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.EncryptContent)
- .HasColumnName("encrypt_content")
- .HasColumnType("mediumtext")
- .HasComment("数据内容")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- });
- modelBuilder.Entity<PushRecord>(entity =>
- {
- entity.ToTable("push_record");
- entity.HasComment("推送记录");
- entity.Property(e => e.Id)
- .HasColumnName("id")
- .HasColumnType("int(11)");
- entity.Property(e => e.CreateDate)
- .HasColumnName("create_date")
- .HasColumnType("datetime")
- .HasComment("创建时间");
- entity.Property(e => e.MerchantId)
- .HasColumnName("merchant_id")
- .HasColumnType("int(11)")
- .HasComment("商户");
- entity.Property(e => e.PushData)
- .HasColumnName("push_data")
- .HasColumnType("mediumtext")
- .HasComment("推送数据")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.PushDataEncrypt)
- .HasColumnName("push_data_encrypt")
- .HasColumnType("mediumtext")
- .HasComment("推送数据加密")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.PushObjId)
- .HasColumnName("push_obj_id")
- .HasColumnType("int(11)")
- .HasComment("推送项目");
- entity.Property(e => e.Sort)
- .HasColumnName("sort")
- .HasColumnType("int(11)")
- .HasComment("排序序号");
- entity.Property(e => e.Status)
- .HasColumnName("status")
- .HasColumnType("int(11)")
- .HasComment("状态");
- entity.Property(e => e.UpdateDate)
- .HasColumnName("update_date")
- .HasColumnType("datetime")
- .HasComment("修改时间");
- entity.Property(e => e.Version)
- .HasColumnName("version")
- .HasColumnType("int(11)")
- .HasComment("版本号");
- });
- modelBuilder.Entity<RePushQueue>(entity =>
- {
- entity.ToTable("re_push_queue");
- entity.HasComment("重推队列");
- entity.Property(e => e.Id)
- .HasColumnName("id")
- .HasColumnType("int(11)");
- entity.Property(e => e.CreateDate)
- .HasColumnName("create_date")
- .HasColumnType("datetime")
- .HasComment("创建时间");
- entity.Property(e => e.MerchantId)
- .HasColumnName("merchant_id")
- .HasColumnType("int(11)")
- .HasComment("商户");
- entity.Property(e => e.PushData)
- .HasColumnName("push_data")
- .HasColumnType("mediumtext")
- .HasComment("推送数据")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.PushDataEncrypt)
- .HasColumnName("push_data_encrypt")
- .HasColumnType("mediumtext")
- .HasComment("推送数据加密")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.PushObjId)
- .HasColumnName("push_obj_id")
- .HasColumnType("int(11)")
- .HasComment("推送项目");
- entity.Property(e => e.PushRecordId)
- .HasColumnType("int(11)")
- .HasComment("推送记录");
- entity.Property(e => e.RePushDate)
- .HasColumnName("re_push_date")
- .HasColumnType("datetime")
- .HasComment("再次重推时间");
- entity.Property(e => e.RePushUrl)
- .HasColumnName("re_push_url")
- .HasColumnType("varchar(500)")
- .HasComment("重推地址")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.Sort)
- .HasColumnName("sort")
- .HasColumnType("int(11)")
- .HasComment("排序序号");
- entity.Property(e => e.Status)
- .HasColumnName("status")
- .HasColumnType("int(11)")
- .HasComment("状态");
- entity.Property(e => e.Times)
- .HasColumnName("times")
- .HasColumnType("int(11)")
- .HasComment("次数");
- entity.Property(e => e.UpdateDate)
- .HasColumnName("update_date")
- .HasColumnType("datetime")
- .HasComment("修改时间");
- entity.Property(e => e.Version)
- .HasColumnName("version")
- .HasColumnType("int(11)")
- .HasComment("版本号");
- });
- modelBuilder.Entity<SourceCondition>(entity =>
- {
- entity.ToTable("source_condition");
- entity.HasComment("原始数据抓取条件");
- entity.Property(e => e.Id)
- .HasColumnName("id")
- .HasColumnType("int(11)");
- entity.Property(e => e.CreateDate)
- .HasColumnName("create_date")
- .HasColumnType("datetime")
- .HasComment("创建时间");
- entity.Property(e => e.QueryCondition)
- .HasColumnName("query_condition")
- .HasColumnType("int(11)")
- .HasComment("查询条件");
- entity.Property(e => e.QueryField)
- .HasColumnName("query_field")
- .HasColumnType("varchar(50)")
- .HasComment("查询字段")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.QueryVal)
- .HasColumnName("query_val")
- .HasColumnType("varchar(50)")
- .HasComment("查询值")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.Sort)
- .HasColumnName("sort")
- .HasColumnType("int(11)")
- .HasComment("排序序号");
- entity.Property(e => e.SourceId)
- .HasColumnName("source_id")
- .HasColumnType("int(11)")
- .HasComment("原始数据");
- entity.Property(e => e.Status)
- .HasColumnName("status")
- .HasColumnType("int(11)")
- .HasComment("状态");
- entity.Property(e => e.UpdateDate)
- .HasColumnName("update_date")
- .HasColumnType("datetime")
- .HasComment("修改时间");
- entity.Property(e => e.Version)
- .HasColumnName("version")
- .HasColumnType("int(11)")
- .HasComment("版本号");
- });
- modelBuilder.Entity<SourceData>(entity =>
- {
- entity.ToTable("source_data");
- entity.HasComment("原始数据配置");
- entity.Property(e => e.Id)
- .HasColumnName("id")
- .HasColumnType("int(11)");
- entity.Property(e => e.CreateDate)
- .HasColumnName("create_date")
- .HasColumnType("datetime")
- .HasComment("创建时间");
- entity.Property(e => e.FieldList)
- .HasColumnName("field_list")
- .HasColumnType("mediumtext")
- .HasComment("查询数据字段")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.QueryId)
- .HasColumnType("int(11)")
- .HasComment("查询数据表Id");
- entity.Property(e => e.Sort)
- .HasColumnName("sort")
- .HasColumnType("int(11)")
- .HasComment("排序序号");
- entity.Property(e => e.Status)
- .HasColumnName("status")
- .HasColumnType("int(11)")
- .HasComment("状态");
- entity.Property(e => e.TableName)
- .HasColumnName("table_name")
- .HasColumnType("varchar(50)")
- .HasComment("数据表名")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.TargetFieldList)
- .HasColumnName("target_field_list")
- .HasColumnType("mediumtext")
- .HasComment("目标表字段")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.Title)
- .HasColumnName("title")
- .HasColumnType("varchar(50)")
- .HasComment("标题说明")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.UpdateDate)
- .HasColumnName("update_date")
- .HasColumnType("datetime")
- .HasComment("修改时间");
- entity.Property(e => e.Version)
- .HasColumnName("version")
- .HasColumnType("int(11)")
- .HasComment("版本号");
- });
- modelBuilder.Entity<SourceDataSubTable>(entity =>
- {
- entity.ToTable("source_data_sub_table");
- entity.HasComment("原始数据关联表");
- entity.Property(e => e.Id)
- .HasColumnName("id")
- .HasColumnType("int(11)");
- entity.Property(e => e.CreateDate)
- .HasColumnName("create_date")
- .HasColumnType("datetime")
- .HasComment("创建时间");
- entity.Property(e => e.QueryField)
- .HasColumnName("query_field")
- .HasColumnType("varchar(50)")
- .HasComment("查询字段")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.ReturnField)
- .HasColumnName("return_field")
- .HasColumnType("varchar(500)")
- .HasComment("返回字段")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.Sort)
- .HasColumnName("sort")
- .HasColumnType("int(11)")
- .HasComment("排序序号");
- entity.Property(e => e.SourceId)
- .HasColumnName("source_id")
- .HasColumnType("int(11)")
- .HasComment("原始数据");
- entity.Property(e => e.Status)
- .HasColumnName("status")
- .HasColumnType("int(11)")
- .HasComment("状态");
- entity.Property(e => e.TableName)
- .HasColumnName("table_name")
- .HasColumnType("varchar(50)")
- .HasComment("表名")
- .HasCharSet("utf8")
- .HasCollation("utf8_general_ci");
- entity.Property(e => e.UpdateDate)
- .HasColumnName("update_date")
- .HasColumnType("datetime")
- .HasComment("修改时间");
- entity.Property(e => e.Version)
- .HasColumnName("version")
- .HasColumnType("int(11)")
- .HasComment("版本号");
- });
- OnModelCreatingPartial(modelBuilder);
- }
- partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
- }
- }
|