// This file has been auto generated by EF Core Power Tools.
#nullable disable
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
namespace PRSA.DAL.DB
{
public partial class PRSAContext : DbContext
{
public PRSAContext()
{
}
public PRSAContext(DbContextOptions options)
: base(options)
{
}
public virtual DbSet le3 { get; set; }
public virtual DbSet mapping { get; set; }
public virtual DbSet master_data { get; set; }
public virtual DbSet open_orders { get; set; }
public virtual DbSet qlikview_sales { get; set; }
public virtual DbSet sales_forecast { get; set; }
public virtual DbSet settings { get; set; }
public virtual DbSet stock_balance { get; set; }
public virtual DbSet tracker { get; set; }
public virtual DbSet users { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity(entity =>
{
entity.ToTable("le3", "Imports");
entity.Property(e => e.created_at).HasColumnType("datetime");
entity.Property(e => e.month)
.IsRequired()
.HasMaxLength(255)
.IsUnicode(false);
entity.Property(e => e.sku_code)
.IsRequired()
.HasMaxLength(255)
.IsUnicode(false);
entity.Property(e => e.updated_at).HasColumnType("datetime");
entity.Property(e => e.value)
.IsRequired()
.HasMaxLength(255)
.IsUnicode(false);
});
modelBuilder.Entity(entity =>
{
entity.ToTable("mapping", "Imports");
entity.Property(e => e.bond_duty)
.IsRequired()
.HasMaxLength(10)
.IsUnicode(false);
entity.Property(e => e.check)
.IsRequired()
.HasMaxLength(10)
.IsUnicode(false);
entity.Property(e => e.created_at).HasColumnType("datetime");
entity.Property(e => e.region)
.IsRequired()
.HasMaxLength(10)
.IsUnicode(false);
entity.Property(e => e.region2)
.IsRequired()
.HasMaxLength(10)
.IsUnicode(false);
entity.Property(e => e.updated_at).HasColumnType("datetime");
entity.Property(e => e.wh)
.IsRequired()
.HasMaxLength(10)
.IsUnicode(false);
});
modelBuilder.Entity(entity =>
{
entity.ToTable("master_data", "Imports");
entity.Property(e => e.created_at).HasColumnType("datetime");
entity.Property(e => e.day)
.IsRequired()
.HasMaxLength(255)
.IsUnicode(false);
entity.Property(e => e.month)
.IsRequired()
.HasMaxLength(255)
.IsUnicode(false);
entity.Property(e => e.updated_at).HasColumnType("datetime");
entity.Property(e => e.week).HasColumnType("datetime");
});
modelBuilder.Entity(entity =>
{
entity.ToTable("open_orders", "Imports");
entity.Property(e => e.created_at).HasColumnType("datetime");
entity.Property(e => e.total_open).HasColumnType("decimal(18, 2)");
entity.Property(e => e.updated_at).HasColumnType("datetime");
entity.Property(e => e.variance).HasColumnType("decimal(18, 2)");
});
modelBuilder.Entity(entity =>
{
entity.ToTable("qlikview_sales", "Imports");
entity.Property(e => e.created_at).HasColumnType("datetime");
entity.Property(e => e.item_description)
.IsRequired()
.HasMaxLength(255)
.IsUnicode(false);
entity.Property(e => e.item_description_2pack)
.IsRequired()
.HasMaxLength(255)
.IsUnicode(false);
entity.Property(e => e.sum_ytd_volumes).HasColumnType("decimal(18, 2)");
entity.Property(e => e.summary).HasColumnType("decimal(18, 2)");
entity.Property(e => e.supersession_total).HasColumnType("decimal(18, 2)");
entity.Property(e => e.updated_at).HasColumnType("datetime");
entity.Property(e => e.variance).HasColumnType("decimal(18, 2)");
entity.Property(e => e.ytd_volumes).HasColumnType("decimal(18, 2)");
});
modelBuilder.Entity(entity =>
{
entity.ToTable("sales_forecast", "Imports");
entity.Property(e => e.created_at).HasColumnType("datetime");
entity.Property(e => e.description)
.IsRequired()
.HasMaxLength(255)
.IsUnicode(false);
entity.Property(e => e.month)
.IsRequired()
.HasMaxLength(255)
.IsUnicode(false);
entity.Property(e => e.month_sales).HasColumnType("decimal(18, 2)");
entity.Property(e => e.updated_at).HasColumnType("datetime");
entity.Property(e => e.value).HasColumnType("decimal(18, 2)");
});
modelBuilder.Entity(entity =>
{
entity.ToTable("settings", "Core");
entity.Property(e => e.created_at).HasColumnType("datetime");
entity.Property(e => e.key_name)
.IsRequired()
.HasMaxLength(255)
.IsUnicode(false);
entity.Property(e => e.updated_at).HasColumnType("datetime");
entity.Property(e => e.value)
.IsRequired()
.HasMaxLength(255)
.IsUnicode(false);
});
modelBuilder.Entity(entity =>
{
entity.ToTable("stock_balance", "Imports");
entity.Property(e => e.created_at).HasColumnType("datetime");
entity.Property(e => e.description)
.IsRequired()
.HasMaxLength(255)
.IsUnicode(false);
entity.Property(e => e.format)
.IsRequired()
.HasMaxLength(255)
.IsUnicode(false);
entity.Property(e => e.updated_at).HasColumnType("datetime");
});
modelBuilder.Entity(entity =>
{
entity.ToTable("tracker", "Imports");
entity.Property(e => e.brand_group)
.IsRequired()
.HasMaxLength(255)
.IsUnicode(false);
entity.Property(e => e.created_at).HasColumnType("datetime");
entity.Property(e => e.fy_1)
.HasColumnType("decimal(18, 2)")
.HasColumnName("fy-1");
entity.Property(e => e.item_description)
.IsRequired()
.HasMaxLength(255)
.IsUnicode(false);
entity.Property(e => e.mtd_sales).HasColumnType("decimal(18, 2)");
entity.Property(e => e.open_orders).HasColumnType("decimal(18, 2)");
entity.Property(e => e.pack_size)
.IsRequired()
.HasMaxLength(255)
.IsUnicode(false);
entity.Property(e => e.perc_sold_excl).HasColumnType("decimal(18, 2)");
entity.Property(e => e.perc_sold_incl).HasColumnType("decimal(18, 2)");
entity.Property(e => e.rf1).HasColumnType("decimal(18, 2)");
entity.Property(e => e.sales_forecast).HasColumnType("decimal(18, 2)");
entity.Property(e => e.stock_balance).HasColumnType("decimal(18, 2)");
entity.Property(e => e.stock_cover).HasColumnType("decimal(18, 2)");
entity.Property(e => e.stocking_type)
.IsRequired()
.HasMaxLength(255)
.IsUnicode(false);
entity.Property(e => e.updated_at).HasColumnType("datetime");
});
modelBuilder.Entity(entity =>
{
entity.ToTable("users", "Core");
entity.Property(e => e.ad_token)
.IsRequired()
.HasMaxLength(255)
.IsUnicode(false);
entity.Property(e => e.created_at).HasColumnType("datetime");
entity.Property(e => e.email)
.IsRequired()
.HasMaxLength(255)
.IsUnicode(false);
entity.Property(e => e.fullname)
.IsRequired()
.HasMaxLength(255)
.IsUnicode(false);
entity.Property(e => e.updated_at).HasColumnType("datetime");
entity.Property(e => e.username)
.IsRequired()
.HasMaxLength(255)
.IsUnicode(false);
});
OnModelCreatingPartial(modelBuilder);
}
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}
}