using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;

namespace Database.Database;

public partial class ModelContext : DbContext
{
    public ModelContext()
    {
    }

    public ModelContext(DbContextOptions<ModelContext> options)
        : base(options)
    {
    }

    public virtual DbSet<AccountUser> AccountUsers { get; set; }

    public virtual DbSet<AppConfig> AppConfigs { get; set; }

    public virtual DbSet<BettingHistory> BettingHistories { get; set; }

    public virtual DbSet<Blacklist> Blacklists { get; set; }

    public virtual DbSet<ChargeLog> ChargeLogs { get; set; }

    public virtual DbSet<ChatToolMessage> ChatToolMessages { get; set; }

    public virtual DbSet<ChatToolUser> ChatToolUsers { get; set; }

    public virtual DbSet<Config> Configs { get; set; }

    public virtual DbSet<ConfigMessage> ConfigMessages { get; set; }

    public virtual DbSet<ExchangeConfig> ExchangeConfigs { get; set; }

    public virtual DbSet<ExchangeHistory> ExchangeHistories { get; set; }

    public virtual DbSet<ExchangeOtp> ExchangeOtps { get; set; }

    public virtual DbSet<JobLog> JobLogs { get; set; }

    public virtual DbSet<LogChat> LogChats { get; set; }

    public virtual DbSet<MpsConfig> MpsConfigs { get; set; }

    public virtual DbSet<Mt> Mts { get; set; }

    public virtual DbSet<MtHi> MtHis { get; set; }

    public virtual DbSet<Packg> Packgs { get; set; }

    public virtual DbSet<PaymentChannel> PaymentChannels { get; set; }

    public virtual DbSet<PaymentTransaction> PaymentTransactions { get; set; }

    public virtual DbSet<PaymentTransactionLog> PaymentTransactionLogs { get; set; }

    public virtual DbSet<PotInfo> PotInfos { get; set; }

    public virtual DbSet<RankingConfig> RankingConfigs { get; set; }

    public virtual DbSet<RankingHistory> RankingHistories { get; set; }

    public virtual DbSet<RankingRewardLog> RankingRewardLogs { get; set; }

    public virtual DbSet<RegInfo> RegInfos { get; set; }

    public virtual DbSet<Room> Rooms { get; set; }

    public virtual DbSet<RoomPrize> RoomPrizes { get; set; }

    public virtual DbSet<RoomResult> RoomResults { get; set; }

    public virtual DbSet<ToolConfig> ToolConfigs { get; set; }

    public virtual DbSet<ToolPayment> ToolPayments { get; set; }

    public virtual DbSet<ToolPlayHistory> ToolPlayHistories { get; set; }

    public virtual DbSet<ToolReport> ToolReports { get; set; }

    public virtual DbSet<ToolScheduler> ToolSchedulers { get; set; }

    public virtual DbSet<ToolSim> ToolSims { get; set; }

    public virtual DbSet<UserTransaction> UserTransactions { get; set; }

    public virtual DbSet<Webservice> Webservices { get; set; }

    public virtual DbSet<WsUser> WsUsers { get; set; }

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        modelBuilder
            .HasDefaultSchema("SICBO")
            .UseCollation("USING_NLS_COMP");

        modelBuilder.Entity<AccountUser>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("ACCOUNT_USER_PK");

            entity.ToTable("ACCOUNT_USER");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.Address)
                .HasMaxLength(1000)
                .IsUnicode(false)
                .HasColumnName("ADDRESS");
            entity.Property(e => e.BetCoin)
                .HasDefaultValueSql("0 ")
                .HasColumnType("NUMBER")
                .HasColumnName("BET_COIN");
            entity.Property(e => e.Birthday)
                .HasColumnType("DATE")
                .HasColumnName("BIRTHDAY");
            entity.Property(e => e.Channel)
                .HasMaxLength(1000)
                .IsUnicode(false)
                .HasDefaultValueSql("'USSD'")
                .HasColumnName("CHANNEL");
            entity.Property(e => e.CreatedDate)
                .HasDefaultValueSql("sysdate ")
                .HasColumnType("DATE")
                .HasColumnName("CREATED_DATE");
            entity.Property(e => e.Email)
                .HasMaxLength(200)
                .IsUnicode(false)
                .HasColumnName("EMAIL");
            entity.Property(e => e.FreeSpin)
                .HasPrecision(10)
                .HasDefaultValueSql("0")
                .HasColumnName("FREE_SPIN");
            entity.Property(e => e.Fullname)
                .HasMaxLength(255)
                .IsUnicode(false)
                .HasDefaultValueSql("'default'")
                .HasColumnName("FULLNAME");
            entity.Property(e => e.Gender)
                .HasColumnType("NUMBER")
                .HasColumnName("GENDER");
            entity.Property(e => e.IsActive)
                .HasPrecision(2)
                .HasDefaultValueSql("1")
                .HasColumnName("IS_ACTIVE");
            entity.Property(e => e.IsLock)
                .HasPrecision(2)
                .HasDefaultValueSql("0")
                .HasColumnName("IS_LOCK");
            entity.Property(e => e.Language)
                .HasPrecision(2)
                .HasDefaultValueSql("1")
                .HasColumnName("LANGUAGE");
            entity.Property(e => e.LastLogin)
                .HasDefaultValueSql("sysdate")
                .HasColumnType("DATE")
                .HasColumnName("LAST_LOGIN");
            entity.Property(e => e.LastUpdate)
                .HasDefaultValueSql("sysdate")
                .HasColumnType("DATE")
                .HasColumnName("LAST_UPDATE");
            entity.Property(e => e.Msisdn)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("MSISDN");
            entity.Property(e => e.Password)
                .HasMaxLength(200)
                .IsUnicode(false)
                .HasColumnName("PASSWORD");
            entity.Property(e => e.Picture)
                .HasMaxLength(500)
                .IsUnicode(false)
                .HasDefaultValueSql("'default.png'")
                .HasColumnName("PICTURE");
            entity.Property(e => e.Point)
                .HasPrecision(10)
                .HasDefaultValueSql("0")
                .HasColumnName("POINT");
            entity.Property(e => e.ResetpassCount)
                .HasDefaultValueSql("0 ")
                .HasColumnType("NUMBER")
                .HasColumnName("RESETPASS_COUNT");
            entity.Property(e => e.ResetpassTime)
                .HasColumnType("DATE")
                .HasColumnName("RESETPASS_TIME");
            entity.Property(e => e.Role)
                .HasMaxLength(100)
                .IsUnicode(false)
                .HasDefaultValueSql("'USER'")
                .HasColumnName("ROLE");
            entity.Property(e => e.ServiceId)
                .HasMaxLength(255)
                .IsUnicode(false)
                .HasColumnName("SERVICE_ID");
            entity.Property(e => e.Status)
                .HasPrecision(2)
                .HasDefaultValueSql("1")
                .HasColumnName("STATUS");
            entity.Property(e => e.TimeLock)
                .HasColumnType("DATE")
                .HasColumnName("TIME_LOCK");
            entity.Property(e => e.Token)
                .HasMaxLength(2000)
                .IsUnicode(false)
                .HasColumnName("TOKEN");
            entity.Property(e => e.TotalFalse)
                .HasPrecision(5)
                .HasDefaultValueSql("0")
                .HasColumnName("TOTAL_FALSE");
            entity.Property(e => e.TotalSpin)
                .HasPrecision(10)
                .HasDefaultValueSql("0\n")
                .HasColumnName("TOTAL_SPIN");
            entity.Property(e => e.UpdatedDate)
                .HasColumnType("DATE")
                .HasColumnName("UPDATED_DATE");
            entity.Property(e => e.Username)
                .HasMaxLength(200)
                .IsUnicode(false)
                .HasColumnName("USERNAME");
            entity.Property(e => e.WinCoin)
                .HasDefaultValueSql("0 ")
                .HasColumnType("NUMBER")
                .HasColumnName("WIN_COIN");
        });

        modelBuilder.Entity<AppConfig>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("APP_CONFIG_PK");

            entity.ToTable("APP_CONFIG");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.Description)
                .HasMaxLength(2000)
                .IsUnicode(false)
                .HasColumnName("DESCRIPTION");
            entity.Property(e => e.Name)
                .HasMaxLength(200)
                .IsUnicode(false)
                .HasColumnName("NAME");
            entity.Property(e => e.Value)
                .HasMaxLength(2000)
                .IsUnicode(false)
                .HasColumnName("VALUE");
        });

        modelBuilder.Entity<BettingHistory>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("BETTING_HISTORY_PK");

            entity.ToTable("BETTING_HISTORY");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.BettingTime)
                .HasDefaultValueSql("sysdate ")
                .HasColumnType("DATE")
                .HasColumnName("BETTING_TIME");
            entity.Property(e => e.BettingType)
                .HasColumnType("NUMBER")
                .HasColumnName("BETTING_TYPE");
            entity.Property(e => e.BettingValue)
                .HasColumnType("NUMBER")
                .HasColumnName("BETTING_VALUE");
            entity.Property(e => e.Msisdn)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("MSISDN");
            entity.Property(e => e.RoomId)
                .HasColumnType("NUMBER")
                .HasColumnName("ROOM_ID");
        });

        modelBuilder.Entity<Blacklist>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("BLACKLIST_PK");

            entity.ToTable("BLACKLIST");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.Msisdn)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("MSISDN");
        });

        modelBuilder.Entity<ChargeLog>(entity =>
        {
            entity
                .HasNoKey()
                .ToTable("CHARGE_LOG");

            entity.Property(e => e.AccountId)
                .HasMaxLength(255)
                .IsUnicode(false)
                .HasColumnName("ACCOUNT_ID");
            entity.Property(e => e.ChargeTime)
                .HasDefaultValueSql("sysdate")
                .HasColumnType("DATE")
                .HasColumnName("CHARGE_TIME");
            entity.Property(e => e.Description)
                .HasColumnType("CLOB")
                .HasColumnName("DESCRIPTION");
            entity.Property(e => e.Fee)
                .HasColumnType("NUMBER(12,2)")
                .HasColumnName("FEE");
            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.InsertTime)
                .HasDefaultValueSql("sysdate")
                .HasColumnType("DATE")
                .HasColumnName("INSERT_TIME");
            entity.Property(e => e.Msisdn)
                .HasMaxLength(255)
                .IsUnicode(false)
                .HasColumnName("MSISDN");
            entity.Property(e => e.Status)
                .HasColumnType("NUMBER")
                .HasColumnName("STATUS");
        });

        modelBuilder.Entity<ChatToolMessage>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("CHAT_TOOL_MESSAGE_PK");

            entity.ToTable("CHAT_TOOL_MESSAGE");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.Message)
                .HasMaxLength(2000)
                .IsUnicode(false)
                .HasColumnName("MESSAGE");
        });

        modelBuilder.Entity<ChatToolUser>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("CHAT_TOOL_USER_PK");

            entity.ToTable("CHAT_TOOL_USER");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.Msisdn)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("MSISDN");
        });

        modelBuilder.Entity<Config>(entity =>
        {
            entity
                .HasNoKey()
                .ToTable("CONFIG");

            entity.Property(e => e.DefaultValue)
                .IsUnicode(false)
                .HasColumnName("DEFAULT_VALUE");
            entity.Property(e => e.Module)
                .HasMaxLength(100)
                .HasColumnName("MODULE");
            entity.Property(e => e.Note)
                .HasMaxLength(1024)
                .HasColumnName("NOTE");
            entity.Property(e => e.ParamName)
                .HasMaxLength(50)
                .HasColumnName("PARAM_NAME");
            entity.Property(e => e.ParamValue)
                .HasMaxLength(1024)
                .HasColumnName("PARAM_VALUE");
            entity.Property(e => e.ParamValueFr)
                .HasMaxLength(1024)
                .HasColumnName("PARAM_VALUE_FR");
        });

        modelBuilder.Entity<ConfigMessage>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("CONFIG_PK");

            entity.ToTable("CONFIG_MESSAGE");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER(38)")
                .HasColumnName("ID");
            entity.Property(e => e.Name)
                .HasMaxLength(100)
                .IsUnicode(false)
                .HasColumnName("NAME");
            entity.Property(e => e.Type)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasDefaultValueSql("'WEB' ")
                .HasColumnName("TYPE");
            entity.Property(e => e.Value)
                .HasMaxLength(1000)
                .IsUnicode(false)
                .HasColumnName("VALUE");
            entity.Property(e => e.ValueGlobal)
                .HasMaxLength(1000)
                .IsUnicode(false)
                .HasColumnName("VALUE_GLOBAL");
            entity.Property(e => e.ValueLocal)
                .HasMaxLength(1000)
                .IsUnicode(false)
                .HasColumnName("VALUE_LOCAL");
        });

        modelBuilder.Entity<ExchangeConfig>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("EXCHANGE_CONFIG_PK");

            entity.ToTable("EXCHANGE_CONFIG");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.CoinCost)
                .HasColumnType("NUMBER")
                .HasColumnName("COIN_COST");
            entity.Property(e => e.Description)
                .HasMaxLength(500)
                .IsUnicode(false)
                .HasColumnName("DESCRIPTION");
            entity.Property(e => e.FeeCoin)
                .HasDefaultValueSql("0")
                .HasColumnType("NUMBER")
                .HasColumnName("FEE_COIN");
            entity.Property(e => e.IsActive)
                .HasPrecision(1)
                .HasDefaultValueSql("1\n   ")
                .HasColumnName("IS_ACTIVE");
            entity.Property(e => e.MoneyReceived)
                .HasColumnType("NUMBER")
                .HasColumnName("MONEY_RECEIVED");
            entity.Property(e => e.ProductName)
                .HasMaxLength(100)
                .IsUnicode(false)
                .HasColumnName("PRODUCT_NAME");
        });

            modelBuilder.Entity<ExchangeHistory>(entity =>
            {
                entity.HasKey(e => e.Id).HasName("EXCHANGE_HISTORY_PK");

                entity.ToTable("EXCHANGE_HISTORY");

            entity.HasIndex(e => new { e.Msisdn, e.ExchangeTime }, "EXCHANGE_HISTORY_IDX_DATE");

            entity.Property(e => e.CoinDeducted)
                .HasColumnType("NUMBER")
                .HasColumnName("COIN_DEDUCTED");
            entity.Property(e => e.ConfigId)
                .HasColumnType("NUMBER")
                .HasColumnName("CONFIG_ID");
            entity.Property(e => e.ExchangeTime)
                .HasDefaultValueSql("sysdate")
                .HasColumnType("DATE")
                .HasColumnName("EXCHANGE_TIME");
            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.MoneyAdded)
                .HasColumnType("NUMBER")
                .HasColumnName("MONEY_ADDED");
            entity.Property(e => e.Msisdn)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("MSISDN");
            entity.Property(e => e.Status)
                .HasPrecision(2)
                .HasDefaultValueSql("1  -- 1: Success\n   ")
                .HasColumnName("STATUS");
        });

        modelBuilder.Entity<ExchangeOtp>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("EXCHANGE_OTP_PK");

            entity.ToTable("EXCHANGE_OTP");

            entity.HasIndex(e => new { e.Msisdn, e.Status, e.ExpiredTime }, "EXCHANGE_OTP_IDX_LOOKUP");
            entity.HasIndex(e => new { e.Status, e.CreatedTime }, "EXCHANGE_OTP_IDX_CLEANUP");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.Msisdn)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("MSISDN");
            entity.Property(e => e.OtpCode)
                .HasMaxLength(10)
                .IsUnicode(false)
                .HasColumnName("OTP_CODE");
            entity.Property(e => e.ConfigId)
                .HasColumnType("NUMBER")
                .HasColumnName("CONFIG_ID");
            entity.Property(e => e.CoinAmount)
                .HasColumnType("NUMBER")
                .HasColumnName("COIN_AMOUNT");
            entity.Property(e => e.MoneyAmount)
                .HasColumnType("NUMBER")
                .HasColumnName("MONEY_AMOUNT");
            entity.Property(e => e.CreatedTime)
                .HasDefaultValueSql("sysdate")
                .HasColumnType("DATE")
                .HasColumnName("CREATED_TIME");
            entity.Property(e => e.ExpiredTime)
                .HasColumnType("DATE")
                .HasColumnName("EXPIRED_TIME");
            entity.Property(e => e.VerifiedTime)
                .HasColumnType("DATE")
                .HasColumnName("VERIFIED_TIME");
            entity.Property(e => e.Status)
                .HasPrecision(1)
                .HasDefaultValueSql("0")
                .HasColumnName("STATUS");
            entity.Property(e => e.AttemptCount)
                .HasPrecision(1)
                .HasDefaultValueSql("0")
                .HasColumnName("ATTEMPT_COUNT");
            entity.Property(e => e.IpAddress)
                .HasMaxLength(50)
                .IsUnicode(false)
                .HasColumnName("IP_ADDRESS");
        });

        modelBuilder.Entity<JobLog>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("JOB_LOG_PK");

            entity.ToTable("JOB_LOG");

            entity.HasIndex(e => new { e.JobName, e.TargetDate, e.Status }, "JOB_LOG_IDX_CHECK");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.EndTime)
                .HasColumnType("DATE")
                .HasColumnName("END_TIME");
            entity.Property(e => e.ErrorMsg)
                .HasMaxLength(2000)
                .IsUnicode(false)
                .HasColumnName("ERROR_MSG");
            entity.Property(e => e.JobName)
                .HasMaxLength(100)
                .IsUnicode(false)
                .HasColumnName("JOB_NAME");
            entity.Property(e => e.JobType)
                .HasMaxLength(50)
                .IsUnicode(false)
                .HasColumnName("JOB_TYPE");
            entity.Property(e => e.StartTime)
                .HasDefaultValueSql("sysdate")
                .HasColumnType("DATE")
                .HasColumnName("START_TIME");
            entity.Property(e => e.Status)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("STATUS");
            entity.Property(e => e.TargetDate)
                .HasColumnType("DATE")
                .HasColumnName("TARGET_DATE");
        });

        modelBuilder.Entity<LogChat>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("LOG_CHAT_PK");

            entity.ToTable("LOG_CHAT");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.ChatTime)
                .HasDefaultValueSql("sysdate ")
                .HasColumnType("DATE")
                .HasColumnName("CHAT_TIME");
            entity.Property(e => e.Message)
                .HasMaxLength(2000)
                .IsUnicode(false)
                .HasColumnName("MESSAGE");
            entity.Property(e => e.Msisdn)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("MSISDN");
        });

        modelBuilder.Entity<MpsConfig>(entity =>
        {
            entity
                .HasNoKey()
                .ToTable("MPS_CONFIG");

            entity.Property(e => e.ActionCode)
                .HasMaxLength(200)
                .IsUnicode(false)
                .HasColumnName("ACTION_CODE");
            entity.Property(e => e.Category)
                .HasMaxLength(100)
                .IsUnicode(false)
                .HasColumnName("CATEGORY");
            entity.Property(e => e.Command)
                .HasMaxLength(100)
                .IsUnicode(false)
                .HasColumnName("COMMAND");
            entity.Property(e => e.CpName)
                .HasMaxLength(100)
                .IsUnicode(false)
                .HasColumnName("CP_NAME");
            entity.Property(e => e.KeyPath)
                .HasMaxLength(200)
                .IsUnicode(false)
                .HasColumnName("KEY_PATH");
            entity.Property(e => e.Price)
                .HasMaxLength(100)
                .IsUnicode(false)
                .HasColumnName("PRICE");
            entity.Property(e => e.Service)
                .HasMaxLength(100)
                .IsUnicode(false)
                .HasColumnName("SERVICE");
            entity.Property(e => e.SubService)
                .HasMaxLength(100)
                .IsUnicode(false)
                .HasColumnName("SUB_SERVICE");
        });

        modelBuilder.Entity<Mt>(entity =>
        {
            entity.HasKey(e => e.MtId).HasName("MT_PK");

            entity.ToTable("MT");

            entity.Property(e => e.MtId)
                .HasColumnType("NUMBER")
                .HasColumnName("MT_ID");
            entity.Property(e => e.Channel)
                .HasMaxLength(10)
                .IsUnicode(false)
                .HasColumnName("CHANNEL");
            entity.Property(e => e.Message).HasColumnName("MESSAGE");
            entity.Property(e => e.MoHisId)
                .HasColumnType("NUMBER")
                .HasColumnName("MO_HIS_ID");
            entity.Property(e => e.Msisdn)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("MSISDN");
            entity.Property(e => e.ReceiveTime)
                .HasColumnType("DATE")
                .HasColumnName("RECEIVE_TIME");
            entity.Property(e => e.RetryNum)
                .HasPrecision(2)
                .HasDefaultValueSql("0")
                .HasColumnName("RETRY_NUM");
        });

        modelBuilder.Entity<MtHi>(entity =>
        {
            entity
                .HasNoKey()
                .ToTable("MT_HIS");

            entity.Property(e => e.Channel)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("CHANNEL");
            entity.Property(e => e.ClusterName)
                .HasMaxLength(80)
                .IsUnicode(false)
                .HasColumnName("CLUSTER_NAME");
            entity.Property(e => e.Message)
                .IsUnicode(false)
                .HasColumnName("MESSAGE");
            entity.Property(e => e.MoHisId)
                .HasPrecision(10)
                .HasColumnName("MO_HIS_ID");
            entity.Property(e => e.Msisdn)
                .HasMaxLength(15)
                .IsUnicode(false)
                .HasColumnName("MSISDN");
            entity.Property(e => e.MtHisId)
                .HasPrecision(10)
                .HasColumnName("MT_HIS_ID");
            entity.Property(e => e.NodeName)
                .HasMaxLength(80)
                .IsUnicode(false)
                .HasColumnName("NODE_NAME");
            entity.Property(e => e.ReceiveTime)
                .HasColumnType("DATE")
                .HasColumnName("RECEIVE_TIME");
            entity.Property(e => e.SentTime)
                .HasColumnType("DATE")
                .HasColumnName("SENT_TIME");
            entity.Property(e => e.Status)
                .HasPrecision(1)
                .HasColumnName("STATUS");
        });

        modelBuilder.Entity<Packg>(entity =>
        {
            entity
                .HasNoKey()
                .ToTable("PACKG");

            entity.Property(e => e.BizId)
                .HasPrecision(5)
                .HasColumnName("BIZ_ID");
            entity.Property(e => e.ExpireDays)
                .HasPrecision(5)
                .HasColumnName("EXPIRE_DAYS");
            entity.Property(e => e.Fee)
                .HasColumnType("NUMBER(12,2)")
                .HasColumnName("FEE");
            entity.Property(e => e.NumberSpin)
                .HasPrecision(5)
                .HasColumnName("NUMBER_SPIN");
            entity.Property(e => e.ProductId)
                .HasPrecision(10)
                .HasColumnName("PRODUCT_ID");
            entity.Property(e => e.ProductName)
                .HasMaxLength(100)
                .IsUnicode(false)
                .HasColumnName("PRODUCT_NAME");
            entity.Property(e => e.Renew)
                .HasPrecision(2)
                .HasDefaultValueSql("0\n   ")
                .HasColumnName("RENEW");
            entity.Property(e => e.SmsSyntax)
                .HasMaxLength(100)
                .IsUnicode(false)
                .HasColumnName("SMS_SYNTAX");
        });

        modelBuilder.Entity<PaymentChannel>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PAYMENT_CHANNEL_PK");

            entity.ToTable("PAYMENT_CHANNEL");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.CreatedDate)
                .HasDefaultValueSql("sysdate ")
                .HasColumnType("DATE")
                .HasColumnName("CREATED_DATE");
            entity.Property(e => e.CurrentCode)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("CURRENT_CODE");
            entity.Property(e => e.Description)
                .HasMaxLength(1000)
                .IsUnicode(false)
                .HasColumnName("DESCRIPTION");
            entity.Property(e => e.FromDate)
                .HasColumnType("DATE")
                .HasColumnName("FROM_DATE");
            entity.Property(e => e.Name)
                .HasMaxLength(200)
                .IsUnicode(false)
                .HasColumnName("NAME");
            entity.Property(e => e.PayType)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("PAY_TYPE");
            entity.Property(e => e.ProviderName)
                .HasMaxLength(200)
                .IsUnicode(false)
                .HasColumnName("PROVIDER_NAME");
            entity.Property(e => e.Status)
                .HasDefaultValueSql("1 ")
                .HasColumnType("NUMBER")
                .HasColumnName("STATUS");
            entity.Property(e => e.ToDate)
                .HasColumnType("DATE")
                .HasColumnName("TO_DATE");
            entity.Property(e => e.Type)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("TYPE");
            entity.Property(e => e.UpdatedDate)
                .HasColumnType("DATE")
                .HasColumnName("UPDATED_DATE");
        });

        modelBuilder.Entity<PaymentTransaction>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PAYMENT_TRANSACTION_PK");

            entity.ToTable("PAYMENT_TRANSACTION");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.Discount)
                .HasDefaultValueSql("0 ")
                .HasColumnType("NUMBER")
                .HasColumnName("DISCOUNT");
            entity.Property(e => e.Money)
                .HasColumnType("NUMBER")
                .HasColumnName("MONEY");
            entity.Property(e => e.Msisdn)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("MSISDN");
            entity.Property(e => e.PartnerTransactionId)
                .HasMaxLength(100)
                .IsUnicode(false)
                .HasColumnName("PARTNER_TRANSACTION_ID");
            entity.Property(e => e.PaymentChannelId)
                .HasColumnType("NUMBER")
                .HasColumnName("PAYMENT_CHANNEL_ID");
            entity.Property(e => e.PaymentTransactionId)
                .HasMaxLength(100)
                .IsUnicode(false)
                .HasColumnName("PAYMENT_TRANSACTION_ID");
            entity.Property(e => e.Status)
                .HasColumnType("NUMBER")
                .HasColumnName("STATUS");
            entity.Property(e => e.TimePayment)
                .HasColumnType("DATE")
                .HasColumnName("TIME_PAYMENT");
            entity.Property(e => e.Type)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("TYPE");
        });

        modelBuilder.Entity<PaymentTransactionLog>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PAYMENT_TRANSACTION_LOG_PK");

            entity.ToTable("PAYMENT_TRANSACTION_LOG");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.PaymentTransactionId)
                .HasColumnType("NUMBER")
                .HasColumnName("PAYMENT_TRANSACTION_ID");
            entity.Property(e => e.ReponseTime)
                .HasColumnType("DATE")
                .HasColumnName("REPONSE_TIME");
            entity.Property(e => e.RequestBody)
                .HasMaxLength(2000)
                .IsUnicode(false)
                .HasColumnName("REQUEST_BODY");
            entity.Property(e => e.RequestTime)
                .HasColumnType("DATE")
                .HasColumnName("REQUEST_TIME");
            entity.Property(e => e.ResponseBody)
                .HasMaxLength(2000)
                .IsUnicode(false)
                .HasColumnName("RESPONSE_BODY");
            entity.Property(e => e.Url)
                .HasMaxLength(200)
                .IsUnicode(false)
                .HasColumnName("URL");
        });

        modelBuilder.Entity<PotInfo>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("POT_MANAGER_PK");

            entity.ToTable("POT_INFO");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.LastUpdate)
                .HasColumnType("DATE")
                .HasColumnName("LAST_UPDATE");
            entity.Property(e => e.Revenue)
                .HasDefaultValueSql("0 ")
                .HasColumnType("NUMBER")
                .HasColumnName("REVENUE");
            entity.Property(e => e.Reward)
                .HasDefaultValueSql("0 ")
                .HasColumnType("NUMBER")
                .HasColumnName("REWARD");
            entity.Property(e => e.Status)
                .HasDefaultValueSql("1 ")
                .HasColumnType("NUMBER")
                .HasColumnName("STATUS");
        });

        modelBuilder.Entity<RankingConfig>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("RANKING_CONFIG_PK");

            entity.ToTable("RANKING_CONFIG");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.Description)
                .HasMaxLength(500)
                .IsUnicode(false)
                .HasColumnName("DESCRIPTION");
            entity.Property(e => e.IsActive)
                .HasPrecision(1)
                .HasDefaultValueSql("1\n   ")
                .HasColumnName("IS_ACTIVE");
            entity.Property(e => e.ProductId)
                .HasPrecision(10)
                .HasColumnName("PRODUCT_ID");
            entity.Property(e => e.RankFrom)
                .HasColumnType("NUMBER")
                .HasColumnName("RANK_FROM");
            entity.Property(e => e.RankTo)
                .HasColumnType("NUMBER")
                .HasColumnName("RANK_TO");
            entity.Property(e => e.RankType)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("RANK_TYPE");
            entity.Property(e => e.RewardUnit)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("REWARD_UNIT");
            entity.Property(e => e.RewardValue)
                .HasColumnType("NUMBER")
                .HasColumnName("REWARD_VALUE");
        });

        modelBuilder.Entity<RankingHistory>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("RANKING_HISTORY_PK");

            entity.ToTable("RANKING_HISTORY");

            entity.HasIndex(e => new { e.RankDate, e.RankType }, "RANKING_HISTORY_IDX_DATE");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.CreatedDate)
                .HasDefaultValueSql("sysdate\n   ")
                .HasColumnType("DATE")
                .HasColumnName("CREATED_DATE");
            entity.Property(e => e.Msisdn)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("MSISDN");
            entity.Property(e => e.RankDate)
                .HasColumnType("DATE")
                .HasColumnName("RANK_DATE");
            entity.Property(e => e.RankPosition)
                .HasColumnType("NUMBER")
                .HasColumnName("RANK_POSITION");
            entity.Property(e => e.RankType)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("RANK_TYPE");
            entity.Property(e => e.TotalBetValue)
                .HasDefaultValueSql("0")
                .HasColumnType("NUMBER")
                .HasColumnName("TOTAL_BET_VALUE");
        });

        modelBuilder.Entity<RankingRewardLog>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("RANKING_REWARD_LOG_PK");

            entity.ToTable("RANKING_REWARD_LOG");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.CreatedDate)
                .HasDefaultValueSql("sysdate\n   ")
                .HasColumnType("DATE")
                .HasColumnName("CREATED_DATE");
            entity.Property(e => e.Msisdn)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("MSISDN");
            entity.Property(e => e.Note)
                .HasMaxLength(500)
                .IsUnicode(false)
                .HasColumnName("NOTE");
            entity.Property(e => e.RankingHistoryId)
                .HasColumnType("NUMBER")
                .HasColumnName("RANKING_HISTORY_ID");
            entity.Property(e => e.RewardDate)
                .HasDefaultValueSql("sysdate")
                .HasColumnType("DATE")
                .HasColumnName("REWARD_DATE");
            entity.Property(e => e.RewardUnit)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("REWARD_UNIT");
            entity.Property(e => e.RewardValue)
                .HasColumnType("NUMBER")
                .HasColumnName("REWARD_VALUE");
            entity.Property(e => e.Status)
                .HasPrecision(2)
                .HasDefaultValueSql("0")
                .HasColumnName("STATUS");
        });

        modelBuilder.Entity<RegInfo>(entity =>
        {
            entity.HasKey(e => e.RegisterId).HasName("SYS_C0012857");

            entity.ToTable("REG_INFO");

            entity.HasIndex(e => e.Msisdn, "REG_INFO_MSISDN_IDX");

            entity.Property(e => e.RegisterId)
                .HasColumnType("NUMBER")
                .HasColumnName("REGISTER_ID");
            entity.Property(e => e.AlreadyCharged)
                .HasColumnType("NUMBER(10,2)")
                .HasColumnName("ALREADY_CHARGED");
            entity.Property(e => e.Channel)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("CHANNEL");
            entity.Property(e => e.EndTime)
                .HasColumnType("DATE")
                .HasColumnName("END_TIME");
            entity.Property(e => e.ExpireTime)
                .HasColumnType("DATE")
                .HasColumnName("EXPIRE_TIME");
            entity.Property(e => e.ExtendSpin)
                .HasPrecision(5)
                .HasColumnName("EXTEND_SPIN");
            entity.Property(e => e.ExtendStatus)
                .HasPrecision(1)
                .HasColumnName("EXTEND_STATUS");
            entity.Property(e => e.LastExtend)
                .HasColumnType("DATE")
                .HasColumnName("LAST_EXTEND");
            entity.Property(e => e.Msisdn)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("MSISDN");
            entity.Property(e => e.NumberSpin)
                .HasPrecision(5)
                .HasColumnName("NUMBER_SPIN");
            entity.Property(e => e.PlayedTimes)
                .HasPrecision(5)
                .HasColumnName("PLAYED_TIMES");
            entity.Property(e => e.ProductName)
                .HasMaxLength(100)
                .IsUnicode(false)
                .HasColumnName("PRODUCT_NAME");
            entity.Property(e => e.RegisterTime)
                .HasColumnType("DATE")
                .HasColumnName("REGISTER_TIME");
            entity.Property(e => e.Renew)
                .HasPrecision(2)
                .HasDefaultValueSql("0")
                .HasColumnName("RENEW");
            entity.Property(e => e.ServiceId)
                .HasColumnType("NUMBER(10,2)")
                .HasColumnName("SERVICE_ID");
            entity.Property(e => e.Status)
                .HasPrecision(1)
                .HasColumnName("STATUS");
        });

        modelBuilder.Entity<Room>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("ROOM_PK");

            entity.ToTable("ROOM");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.EndedTime)
                .HasColumnType("DATE")
                .HasColumnName("ENDED_TIME");
            entity.Property(e => e.ResultType)
                .HasColumnType("NUMBER")
                .HasColumnName("RESULT_TYPE");
            entity.Property(e => e.ResultValue)
                .HasColumnType("NUMBER")
                .HasColumnName("RESULT_VALUE");
            entity.Property(e => e.StartedTime)
                .HasColumnType("DATE")
                .HasColumnName("STARTED_TIME");
            entity.Property(e => e.Status)
                .HasColumnType("NUMBER")
                .HasColumnName("STATUS");
        });

        modelBuilder.Entity<RoomPrize>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("USER_ROOM_PRICE_PK");

            entity.ToTable("ROOM_PRIZE");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.BackCoin)
                .HasDefaultValueSql("0 ")
                .HasColumnType("NUMBER")
                .HasColumnName("BACK_COIN");
            entity.Property(e => e.Msisdn)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("MSISDN");
            entity.Property(e => e.RoomId)
                .HasColumnType("NUMBER")
                .HasColumnName("ROOM_ID");
            entity.Property(e => e.TimeCalculate)
                .HasColumnType("DATE")
                .HasColumnName("TIME_CALCULATE");
            entity.Property(e => e.Type)
                .HasColumnType("NUMBER")
                .HasColumnName("TYPE");
            entity.Property(e => e.WinCoin)
                .HasColumnType("NUMBER")
                .HasColumnName("WIN_COIN");
        });

        modelBuilder.Entity<RoomResult>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("ROOM_RESULT_PK");

            entity.ToTable("ROOM_RESULT");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.Dice1)
                .HasColumnType("NUMBER")
                .HasColumnName("DICE_1");
            entity.Property(e => e.Dice2)
                .HasColumnType("NUMBER")
                .HasColumnName("DICE_2");
            entity.Property(e => e.Dice3)
                .HasColumnType("NUMBER")
                .HasColumnName("DICE_3");
            entity.Property(e => e.MoneyTai)
                .HasColumnType("NUMBER")
                .HasColumnName("MONEY_TAI");
            entity.Property(e => e.MoneyType)
                .HasColumnType("NUMBER")
                .HasColumnName("MONEY_TYPE");
            entity.Property(e => e.MoneyXiu)
                .HasColumnType("NUMBER")
                .HasColumnName("MONEY_XIU");
            entity.Property(e => e.NumberTai)
                .HasColumnType("NUMBER")
                .HasColumnName("NUMBER_TAI");
            entity.Property(e => e.NumberXiu)
                .HasColumnType("NUMBER")
                .HasColumnName("NUMBER_XIU");
            entity.Property(e => e.RefundTai)
                .HasColumnType("NUMBER")
                .HasColumnName("REFUND_TAI");
            entity.Property(e => e.RefundXiu)
                .HasColumnType("NUMBER")
                .HasColumnName("REFUND_XIU");
            entity.Property(e => e.Result)
                .HasColumnType("NUMBER")
                .HasColumnName("RESULT");
            entity.Property(e => e.RoomId)
                .HasColumnType("NUMBER")
                .HasColumnName("ROOM_ID");
            entity.Property(e => e.TimeCalculate)
                .HasColumnType("DATE")
                .HasColumnName("TIME_CALCULATE");
            entity.Property(e => e.TotalExpend)
                .HasColumnType("NUMBER")
                .HasColumnName("TOTAL_EXPEND");
            entity.Property(e => e.TotalRevenue)
                .HasColumnType("NUMBER")
                .HasColumnName("TOTAL_REVENUE");
        });

        modelBuilder.Entity<ToolConfig>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("TOOL_CONFIG_PK");

            entity.ToTable("TOOL_CONFIG");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.Description)
                .HasMaxLength(500)
                .IsUnicode(false)
                .HasColumnName("DESCRIPTION");
            entity.Property(e => e.Name)
                .HasMaxLength(100)
                .IsUnicode(false)
                .HasColumnName("NAME");
            entity.Property(e => e.Value)
                .HasMaxLength(200)
                .IsUnicode(false)
                .HasColumnName("VALUE");
        });

        modelBuilder.Entity<ToolPayment>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("TABLE1_PK");

            entity.ToTable("TOOL_PAYMENT");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.Money)
                .HasColumnType("NUMBER")
                .HasColumnName("MONEY");
            entity.Property(e => e.Msisdn)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("MSISDN");
            entity.Property(e => e.PaymentTime)
                .HasColumnType("DATE")
                .HasColumnName("PAYMENT_TIME");
            entity.Property(e => e.PaymentTransactionId)
                .HasMaxLength(200)
                .IsUnicode(false)
                .HasColumnName("PAYMENT_TRANSACTION_ID");
            entity.Property(e => e.Status)
                .HasPrecision(4)
                .HasColumnName("STATUS");
            entity.Property(e => e.ToolSimId)
                .HasDefaultValueSql("NULL ")
                .HasColumnType("NUMBER")
                .HasColumnName("TOOL_SIM_ID");

            entity.HasOne(d => d.ToolSim).WithMany(p => p.ToolPayments)
                .HasForeignKey(d => d.ToolSimId)
                .OnDelete(DeleteBehavior.ClientSetNull)
                .HasConstraintName("TOOL_PAYMENT_FK1");
        });

        modelBuilder.Entity<ToolPlayHistory>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("TOOL_PLAY_HISTORY_PK");

            entity.ToTable("TOOL_PLAY_HISTORY");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.BetCoin)
                .HasPrecision(5)
                .HasColumnName("BET_COIN");
            entity.Property(e => e.BetType)
                .HasPrecision(2)
                .HasColumnName("BET_TYPE");
            entity.Property(e => e.Msisdn)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("MSISDN");
            entity.Property(e => e.PlayingTime)
                .HasColumnType("DATE")
                .HasColumnName("PLAYING_TIME");
            entity.Property(e => e.ToolSimId)
                .HasDefaultValueSql("NULL ")
                .HasColumnType("NUMBER")
                .HasColumnName("TOOL_SIM_ID");

            entity.HasOne(d => d.ToolSim).WithMany(p => p.ToolPlayHistories)
                .HasForeignKey(d => d.ToolSimId)
                .OnDelete(DeleteBehavior.ClientSetNull)
                .HasConstraintName("TOOL_PLAY_HISTORY_FK1");
        });

        modelBuilder.Entity<ToolReport>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("TOOL_REPORT_PK");

            entity.ToTable("TOOL_REPORT");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.CoinBuy)
                .HasDefaultValueSql("0 ")
                .HasColumnType("NUMBER")
                .HasColumnName("COIN_BUY");
            entity.Property(e => e.CoinWin)
                .HasDefaultValueSql("0 ")
                .HasColumnType("NUMBER")
                .HasColumnName("COIN_WIN");
            entity.Property(e => e.MoneyAddFailure)
                .HasDefaultValueSql("0 ")
                .HasColumnType("NUMBER")
                .HasColumnName("MONEY_ADD_FAILURE");
            entity.Property(e => e.MoneyAddSuccess)
                .HasDefaultValueSql("0 ")
                .HasColumnType("NUMBER")
                .HasColumnName("MONEY_ADD_SUCCESS");
            entity.Property(e => e.MoneyBuyFailure)
                .HasDefaultValueSql("0 ")
                .HasColumnType("NUMBER")
                .HasColumnName("MONEY_BUY_FAILURE");
            entity.Property(e => e.MoneyBuyPlan)
                .HasDefaultValueSql("0 ")
                .HasColumnType("NUMBER")
                .HasColumnName("MONEY_BUY_PLAN");
            entity.Property(e => e.MoneyBuySuccess)
                .HasDefaultValueSql("0 ")
                .HasColumnType("NUMBER")
                .HasColumnName("MONEY_BUY_SUCCESS");
            entity.Property(e => e.PlayingTime)
                .HasDefaultValueSql("0 ")
                .HasColumnType("NUMBER")
                .HasColumnName("PLAYING_TIME");
            entity.Property(e => e.TimeReport)
                .HasColumnType("DATE")
                .HasColumnName("TIME_REPORT");
            entity.Property(e => e.ToolSimId)
                .HasColumnType("NUMBER")
                .HasColumnName("TOOL_SIM_ID");
            entity.Property(e => e.Type)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("TYPE");
        });

        modelBuilder.Entity<ToolScheduler>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("TOOL_SCHEDULER_PK");

            entity.ToTable("TOOL_SCHEDULER");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.DateRunning)
                .HasMaxLength(200)
                .IsUnicode(false)
                .HasColumnName("DATE_RUNNING");
            entity.Property(e => e.HourRunning)
                .HasMaxLength(200)
                .IsUnicode(false)
                .HasColumnName("HOUR_RUNNING");
            entity.Property(e => e.Money)
                .HasDefaultValueSql("0 ")
                .HasColumnType("NUMBER")
                .HasColumnName("MONEY");
            entity.Property(e => e.ToolSimId)
                .HasColumnType("NUMBER")
                .HasColumnName("TOOL_SIM_ID");

            entity.HasOne(d => d.ToolSim).WithMany(p => p.ToolSchedulers)
                .HasForeignKey(d => d.ToolSimId)
                .OnDelete(DeleteBehavior.ClientSetNull)
                .HasConstraintName("TOOL_SCHEDULER_FK1");
        });

        modelBuilder.Entity<ToolSim>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("TOOL_MSISDN_PK");

            entity.ToTable("TOOL_SIM");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.BetCoin)
                .HasDefaultValueSql("0 ")
                .HasColumnType("NUMBER")
                .HasColumnName("BET_COIN");
            entity.Property(e => e.Code)
                .HasMaxLength(200)
                .IsUnicode(false)
                .HasColumnName("CODE");
            entity.Property(e => e.Money)
                .HasDefaultValueSql("0 ")
                .HasColumnType("NUMBER")
                .HasColumnName("MONEY");
            entity.Property(e => e.Msisdn)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("MSISDN");
            entity.Property(e => e.Status)
                .HasPrecision(1)
                .HasColumnName("STATUS");
            entity.Property(e => e.WinCoin)
                .HasDefaultValueSql("0 ")
                .HasColumnType("NUMBER")
                .HasColumnName("WIN_COIN");
        });

        modelBuilder.Entity<UserTransaction>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("USER_TRANSACTION_PK");

            entity.ToTable("USER_TRANSACTION");

            entity.Property(e => e.Id)
                .HasColumnType("NUMBER")
                .HasColumnName("ID");
            entity.Property(e => e.CreatedTime)
                .HasColumnType("DATE")
                .HasColumnName("CREATED_TIME");
            entity.Property(e => e.Money)
                .HasDefaultValueSql("0 ")
                .HasColumnType("NUMBER")
                .HasColumnName("MONEY");
            entity.Property(e => e.Msisdn)
                .HasMaxLength(20)
                .IsUnicode(false)
                .HasColumnName("MSISDN");
            entity.Property(e => e.Otp)
                .HasMaxLength(10)
                .IsUnicode(false)
                .HasColumnName("OTP");
            entity.Property(e => e.PackageCode)
                .HasMaxLength(200)
                .IsUnicode(false)
                .HasColumnName("PACKAGE_CODE");
            entity.Property(e => e.PaymentChannelId)
                .HasDefaultValueSql("0 ")
                .HasColumnType("NUMBER")
                .HasColumnName("PAYMENT_CHANNEL_ID");
            entity.Property(e => e.Status)
                .IsRequired()
                .HasPrecision(1)
                .HasDefaultValueSql("1 ")
                .HasColumnName("STATUS");
            entity.Property(e => e.TimeLeft)
                .HasDefaultValueSql("2")
                .HasColumnType("NUMBER")
                .HasColumnName("TIME_LEFT");
            entity.Property(e => e.TransactionId)
                .HasMaxLength(200)
                .IsUnicode(false)
                .HasColumnName("TRANSACTION_ID");
        });

        modelBuilder.Entity<Webservice>(entity =>
        {
            entity.HasKey(e => e.WsId).HasName("WS_PK");

            entity.ToTable("WEBSERVICE");

            entity.Property(e => e.WsId)
                .HasPrecision(10)
                .ValueGeneratedNever()
                .HasColumnName("WS_ID");
            entity.Property(e => e.ErrorTag)
                .HasMaxLength(100)
                .IsUnicode(false)
                .HasColumnName("ERROR_TAG");
            entity.Property(e => e.MsgTemplate)
                .HasMaxLength(2000)
                .IsUnicode(false)
                .HasColumnName("MSG_TEMPLATE");
            entity.Property(e => e.ResponseTag)
                .HasMaxLength(100)
                .IsUnicode(false)
                .HasColumnName("RESPONSE_TAG");
            entity.Property(e => e.Status)
                .HasPrecision(1)
                .HasColumnName("STATUS");
            entity.Property(e => e.WsCode)
                .HasMaxLength(100)
                .IsUnicode(false)
                .HasColumnName("WS_CODE");
            entity.Property(e => e.WsName)
                .HasMaxLength(1000)
                .IsUnicode(false)
                .HasColumnName("WS_NAME");
            entity.Property(e => e.Wsdl)
                .HasMaxLength(1000)
                .IsUnicode(false)
                .HasColumnName("WSDL");
        });

        modelBuilder.Entity<WsUser>(entity =>
        {
            entity
                .HasNoKey()
                .ToTable("WS_USER");

            entity.Property(e => e.IpAddress)
                .HasMaxLength(100)
                .IsUnicode(false)
                .HasColumnName("IP_ADDRESS");
            entity.Property(e => e.Password)
                .HasMaxLength(100)
                .IsUnicode(false)
                .HasColumnName("PASSWORD");
            entity.Property(e => e.Username)
                .HasMaxLength(100)
                .IsUnicode(false)
                .HasColumnName("USERNAME");
            entity.Property(e => e.WsUserId)
                .HasPrecision(10)
                .HasColumnName("WS_USER_ID");
        });
        modelBuilder.HasSequence("EXCHANGE_CONFIG_SEQ");
        modelBuilder.HasSequence("EXCHANGE_HISTORY_SEQ");
        modelBuilder.HasSequence("JOB_LOG_SEQ");
        modelBuilder.HasSequence("RANKING_CONFIG_SEQ");
        modelBuilder.HasSequence("RANKING_HISTORY_SEQ");
        modelBuilder.HasSequence("RANKING_REWARD_SEQ");
        modelBuilder.HasSequence("TOOL_PAYMENT_SEQ");
        modelBuilder.HasSequence("TOOL_PLAY_HISTORY_SEQ");
        modelBuilder.HasSequence("TOOL_SCHEDULER_SEQ");
        modelBuilder.HasSequence("TOOL_SIM_SEQ");
        modelBuilder.HasSequence("MT_SEQ"); 

        OnModelCreatingPartial(modelBuilder);
    }

    partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}
