You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
6.4 KiB

1 year ago
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using ChangkeTec.SDMS.Model.DataCenterTables;
namespace ChangkeTec.SDMS.Model
{
[DbConfigurationType(typeof(SqlDbConfiguration))]
public class DataCenterContext : DbContext
{
public DataCenterContext() : base("name=DataCenterContext")
{
}
public DataCenterContext(string strConn) : base(strConn)
{
//Database.SetInitializer(new DataCenterDatabaseInitializer());
}
public virtual DbSet<TA_BUTTON> TA_BUTTON { get; set; }
public virtual DbSet<TA_DEPT> TA_DEPT { get; set; }
public virtual DbSet<TA_MENU> TA_MENU { get; set; }
public virtual DbSet<TA_USER> TA_USER { get; set; }
public virtual DbSet<TA_USER_BUTTON> TA_USER_BUTTON { get; set; }
public virtual DbSet<TA_USER_MENU> TA_USER_MENU { get; set; }
public virtual DbSet<TA_USER_TABLE> TA_USER_TABLE { get; set; }
public virtual DbSet<TA_CONFIG> TA_CONFIG { get; set; }
public virtual DbSet<TL_DATA_CHANGE> TL_DATA_CHANGE { get; set; }
public virtual DbSet<TL_LOGIN> TL_LOGIN { get; set; }
public virtual DbSet<TL_EXCEPTION> TL_EXCEPTION { get; set; }
public virtual DbSet<TS_EDI_DATA> TS_EDI_DATA { get; set; }
public virtual DbSet<TT_EDI_DATA> TT_EDI_DATA { get; set; }
public virtual DbSet<TA_TABLE> TA_TABLE { get; set; }
public virtual DbSet<TA_TASK> TA_TASK { get; set; }
public virtual DbSet<TA_TASK_HIS> TA_TASK_HIS { get; set; }
public virtual DbSet<TS_SUPPLIER> TS_SUPPLIER { get; set; }
public virtual DbSet<TS_CUSTOMER> TS_CUSTOMER { get; set; }
public virtual DbSet<TS_DOMAIN> TS_DOMAIN { get; set; }
public virtual DbSet<TS_WORK_CENTER> TS_WORK_CENTER { get; set; }
public virtual DbSet<TS_SUPPLIER_TYPE> TS_SUPPLIER_TYPE { get; set; }
public virtual DbSet<TS_SUB_ACCOUNT> TS_SUB_ACCOUNT { get; set; }
public virtual DbSet<TS_SITE> TS_SITE { get; set; }
public virtual DbSet<TS_CODE_TYPE> TS_CODE_TYPE { get; set; }
public virtual DbSet<TS_CODE> TS_CODE { get; set; }
public virtual DbSet<TS_PRODUCT_LINE> TS_PRODUCT_LINE { get; set; }
public virtual DbSet<TS_PROJECT> TS_PROJECT { get; set; }
public virtual DbSet<TS_DEPARTMENT> TS_DEPARTMENT { get; set; }
public virtual DbSet<TS_ENTITY> TS_ENTITY { get; set; }
public virtual DbSet<TS_CUSTOMER_TYPE> TS_CUSTOMER_TYPE { get; set; }
public virtual DbSet<TS_COST_CENTER> TS_COST_CENTER { get; set; }
public virtual DbSet<TS_ACCOUNT> TS_ACCOUNT { get; set; }
public virtual DbSet<TS_ROUTING> TS_ROUTING { get; set; }
public virtual DbSet<TS_PART_MSTR> TS_PART_MSTR { get; set; }
public virtual DbSet<TS_PART_DET> TS_PART_DET { get; set; }
public virtual DbSet<TS_MES_DATA> TS_MES_DATA { get; set; }
public virtual DbSet<TS_LOCATION> TS_LOCATION { get; set; }
public virtual DbSet<TS_LINE> TS_LINE { get; set; }
public virtual DbSet<TS_COLOR> TS_COLOR { get; set; }
public virtual DbSet<TS_BOM> TS_BOM { get; set; }
public virtual DbSet<TS_PACK> TS_PACK { get; set; }
public virtual DbSet<TS_SUPPLIER_PART> TS_SUPPLIER_PART { get; set; }
public virtual DbSet<TS_CUSTOMER_PART> TS_CUSTOMER_PART { get; set; }
public virtual DbSet<TS_LINE_PART> TS_LINE_PART { get; set; }
public virtual DbSet<TS_PURCHASE_PRICE> TS_PURCHASE_PRICE { get; set; }
public virtual DbSet<TS_SALE_PRICE> TS_SALE_PRICE { get; set; }
public virtual DbSet<TS_STAND_COST_PRICE> TS_STAND_COST_PRICE { get; set; }
public virtual DbSet<TS_TEAM> TS_TEAM { get; set; }
public virtual DbSet<TS_SHIFT> TS_SHIFT { get; set; }
public virtual DbSet<TS_WMS_LOCATION> TS_WMS_LOCATION { get; set; }
public virtual DbSet<TT_SUPPLIER> TT_SUPPLIER { get; set; }
public virtual DbSet<TT_CUSTOMER> TT_CUSTOMER { get; set; }
public virtual DbSet<TT_DOMAIN> TT_DOMAIN { get; set; }
public virtual DbSet<TT_WORK_CENTER> TT_WORK_CENTER { get; set; }
public virtual DbSet<TT_SUPPLIER_TYPE> TT_SUPPLIER_TYPE { get; set; }
public virtual DbSet<TT_SUB_ACCOUNT> TT_SUB_ACCOUNT { get; set; }
public virtual DbSet<TT_SITE> TT_SITE { get; set; }
public virtual DbSet<TT_CODE_TYPE> TT_CODE_TYPE { get; set; }
public virtual DbSet<TT_CODE> TT_CODE { get; set; }
public virtual DbSet<TT_PRODUCT_LINE> TT_PRODUCT_LINE { get; set; }
public virtual DbSet<TT_PROJECT> TT_PROJECT { get; set; }
public virtual DbSet<TT_DEPARTMENT> TT_DEPARTMENT { get; set; }
public virtual DbSet<TT_ENTITY> TT_ENTITY { get; set; }
public virtual DbSet<TT_CUSTOMER_TYPE> TT_CUSTOMER_TYPE { get; set; }
public virtual DbSet<TT_COST_CENTER> TT_COST_CENTER { get; set; }
public virtual DbSet<TT_ACCOUNT> TT_ACCOUNT { get; set; }
public virtual DbSet<TT_ROUTING> TT_ROUTING { get; set; }
public virtual DbSet<TT_PART_MSTR> TT_PART_MSTR { get; set; }
public virtual DbSet<TT_PART_DET> TT_PART_DET { get; set; }
public virtual DbSet<TT_MES_DATA> TT_MES_DATA { get; set; }
public virtual DbSet<TT_LOCATION> TT_LOCATION { get; set; }
public virtual DbSet<TT_LINE> TT_LINE { get; set; }
public virtual DbSet<TT_COLOR> TT_COLOR { get; set; }
public virtual DbSet<TT_BOM> TT_BOM { get; set; }
public virtual DbSet<TT_PACK> TT_PACK { get; set; }
public virtual DbSet<TT_SUPPLIER_PART> TT_SUPPLIER_PART { get; set; }
public virtual DbSet<TT_CUSTOMER_PART> TT_CUSTOMER_PART { get; set; }
public virtual DbSet<TT_LINE_PART> TT_LINE_PART { get; set; }
public virtual DbSet<TT_PURCHASE_PRICE> TT_PURCHASE_PRICE { get; set; }
public virtual DbSet<TT_SALE_PRICE> TT_SALE_PRICE { get; set; }
public virtual DbSet<TT_STAND_COST_PRICE> TT_STAND_COST_PRICE { get; set; }
public virtual DbSet<TT_TEAM> TT_TEAM { get; set; }
public virtual DbSet<TT_SHIFT> TT_SHIFT { get; set; }
public virtual DbSet<TT_WMS_LOCATION> TT_WMS_LOCATION { get; set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.Conventions.Remove<DecimalPropertyConvention>();
modelBuilder.Conventions.Add(new DecimalPropertyConvention(18, 5));
}
}
}