using System;
|
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
#nullable disable
|
|
namespace zhengcaioa.Models
|
{
|
public partial class IMdbtestContext : DbContext
|
{
|
public IMdbtestContext()
|
{
|
}
|
|
public IMdbtestContext(DbContextOptions<IMdbtestContext> options)
|
: base(options)
|
{
|
}
|
|
public virtual DbSet<ImUserInfo> ImUserInfos { 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=IMdbtest;User ID=sa;Password=123456");
|
}
|
}
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
{
|
modelBuilder.HasAnnotation("Relational:Collation", "Chinese_PRC_CI_AS");
|
|
modelBuilder.Entity<ImUserInfo>(entity =>
|
{
|
entity.ToTable("ImUserInfo");
|
|
entity.HasComment("Im用户相关");
|
|
entity.Property(e => e.Id)
|
.HasMaxLength(200)
|
.IsUnicode(false)
|
.HasColumnName("ID")
|
.HasComment("外部系统关联ID,跟外部关联ID一致");
|
|
entity.Property(e => e.CreatBy)
|
.HasMaxLength(200)
|
.IsUnicode(false)
|
.HasComment("创建人");
|
|
entity.Property(e => e.CreatTime)
|
.HasColumnType("datetime")
|
.HasComment("创建时间");
|
|
entity.Property(e => e.Gender).HasComment("0为男 ,1 为女");
|
|
entity.Property(e => e.HeadPictureId)
|
.HasColumnName("HeadPictureID")
|
.HasComment("头像附件");
|
|
entity.Property(e => e.IsEn).HasComment("使能(是否有效)");
|
|
entity.Property(e => e.Isdelete)
|
.HasColumnName("isdelete")
|
.HasComment("删除标志");
|
|
entity.Property(e => e.NickName)
|
.HasMaxLength(200)
|
.IsUnicode(false)
|
.HasComment("昵称");
|
|
entity.Property(e => e.Other)
|
.HasMaxLength(30)
|
.IsUnicode(false)
|
.HasComment("其他");
|
|
entity.Property(e => e.Sign)
|
.HasMaxLength(60)
|
.IsUnicode(false)
|
.HasColumnName("sign")
|
.HasComment("签名,长度不超过60");
|
|
entity.Property(e => e.Sort)
|
.HasColumnName("sort")
|
.HasComment("排序");
|
|
entity.Property(e => e.UpdataBy)
|
.HasMaxLength(200)
|
.IsUnicode(false)
|
.HasComment("修改人");
|
|
entity.Property(e => e.UpdataTime)
|
.HasColumnType("datetime")
|
.HasComment("修改时间");
|
});
|
|
OnModelCreatingPartial(modelBuilder);
|
}
|
|
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
|
}
|
}
|