using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata; #nullable disable namespace zhengcaioa.Models { public partial class WebCrawlerContext : DbContext { public WebCrawlerContext() { this.Database.SetCommandTimeout(60); } public WebCrawlerContext(DbContextOptions options) : base(options) { } public virtual DbSet TProjectDictionaries { get; set; } public virtual DbSet Updatetimes { get; set; } public virtual DbSet ZhengfuProjects { 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=WebCrawler;User ID=sa;Password=123456"); } } protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.HasAnnotation("Relational:Collation", "Chinese_PRC_CI_AS"); modelBuilder.Entity(entity => { entity.ToTable("t_project_dictionary"); entity.Property(e => e.Id).HasColumnName("id"); entity.Property(e => e.Code) .HasMaxLength(10) .HasColumnName("code"); entity.Property(e => e.SiteId).HasColumnName("site_id"); entity.Property(e => e.SortId).HasColumnName("sort_id"); entity.Property(e => e.Status).HasColumnName("status"); entity.Property(e => e.Title) .HasMaxLength(20) .HasColumnName("title"); entity.Property(e => e.Typecode).HasColumnName("typecode"); }); modelBuilder.Entity(entity => { entity.ToTable("updatetime"); entity.Property(e => e.Id).HasMaxLength(50); entity.Property(e => e.Sheng) .HasMaxLength(50) .HasColumnName("sheng"); entity.Property(e => e.Updatetime1) .HasColumnType("datetime") .HasColumnName("updatetime"); }); modelBuilder.Entity(entity => { entity.ToTable("zhengfu_Project"); entity.Property(e => e.Id).HasMaxLength(50); entity.Property(e => e.Agency) .HasMaxLength(500) .HasColumnName("agency"); entity.Property(e => e.AgencyCode) .HasMaxLength(100) .HasColumnName("agencyCode"); entity.Property(e => e.Budget) .HasColumnType("money") .HasColumnName("budget"); entity.Property(e => e.Cgfs) .HasMaxLength(20) .HasColumnName("cgfs") .HasComment("采购方式"); entity.Property(e => e.City) .HasMaxLength(50) .HasColumnName("city"); entity.Property(e => e.Content) .HasColumnName("content") .HasComment("公告内容"); entity.Property(e => e.Creater) .IsRequired() .HasMaxLength(50) .HasColumnName("creater") .HasDefaultValueSql("('1')"); entity.Property(e => e.Createtime) .HasColumnType("datetime") .HasColumnName("createtime") .HasDefaultValueSql("(getdate())"); entity.Property(e => e.Gglx) .HasMaxLength(20) .HasColumnName("gglx") .HasComment("公告类型"); entity.Property(e => e.Modifier) .IsRequired() .HasMaxLength(50) .HasColumnName("modifier") .HasDefaultValueSql("('1')"); entity.Property(e => e.Modifytime) .HasColumnType("datetime") .HasColumnName("modifytime") .HasDefaultValueSql("(getdate())"); entity.Property(e => e.NoticeTime) .HasColumnType("datetime") .HasColumnName("noticeTime") .HasComment("公告日期"); entity.Property(e => e.OpenTenderCode) .HasMaxLength(100) .HasColumnName("openTenderCode") .HasComment("公告编号"); entity.Property(e => e.OpenTenderTime) .HasColumnType("datetime") .HasColumnName("openTenderTime"); entity.Property(e => e.Pageurl) .HasMaxLength(500) .HasColumnName("pageurl") .HasComment("提取链接"); entity.Property(e => e.Pingmu) .HasMaxLength(20) .HasColumnName("pingmu"); entity.Property(e => e.Purchaser) .HasMaxLength(500) .HasColumnName("purchaser"); entity.Property(e => e.RecStatus) .IsRequired() .HasMaxLength(1) .HasColumnName("rec_status") .HasDefaultValueSql("('A')"); entity.Property(e => e.RegionCode) .HasMaxLength(50) .HasColumnName("regionCode"); entity.Property(e => e.Remark) .HasMaxLength(4000) .HasColumnName("remark"); entity.Property(e => e.Sheng) .HasMaxLength(50) .HasColumnName("sheng"); entity.Property(e => e.Shorttitle) .HasMaxLength(500) .HasColumnName("shorttitle") .HasComment("公告段标题"); entity.Property(e => e.Title) .HasMaxLength(500) .HasColumnName("title") .HasComment("公告标题"); }); OnModelCreatingPartial(modelBuilder); } partial void OnModelCreatingPartial(ModelBuilder modelBuilder); } }