초기커밋
This commit is contained in:
31
BrokerApiCore/Repository/SqlContext/SsoAccountDbContext.cs
Normal file
31
BrokerApiCore/Repository/SqlContext/SsoAccountDbContext.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
namespace BrokerCore.Repository.Context;
|
||||
|
||||
using DbEntity;
|
||||
|
||||
public class SsoAccountDbContext: DbContext
|
||||
{
|
||||
private readonly DbContextOptions<SsoAccountDbContext> m_options;
|
||||
public DbSet<SsoAccountInfo> SsoAccounts { get; set; }
|
||||
// public DbSet<WalletUser> WalletUsers { get; set; }
|
||||
|
||||
public SsoAccountDbContext(DbContextOptions<SsoAccountDbContext> options) : base(options)
|
||||
{
|
||||
m_options = options;
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
modelBuilder.Entity<SsoAccountInfo>(entity =>
|
||||
{
|
||||
entity.ToTable("wallet_user");
|
||||
entity.HasNoKey();
|
||||
entity.Property(x => x.Id).HasColumnName("id").HasColumnType("bigint unsigned");
|
||||
entity.Property(x => x.AccessToken).HasColumnName("access_token").HasColumnType("bigint unsigned");
|
||||
entity.Property(x => x.AccessTokenIgm).HasColumnName("access_igm_token").HasColumnType("bigint unsigned");
|
||||
entity.Property(x => x.Email).HasColumnName("email").HasColumnType("varchar(500)");
|
||||
});
|
||||
// base.OnModelCreating(modelBuilder);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user