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.

351 lines
18 KiB

4 years ago
using System.Data.Entity;
using CK.SCP.Models.ScpEntity;
namespace CK.SCP.Models
{
public class SqlDbConfiguration : DbConfiguration
{
public SqlDbConfiguration()
{
this.SetManifestTokenResolver(new Sql2008ManifestTokenResolver());
}
}
public class Sql2008ManifestTokenResolver : System.Data.Entity.Infrastructure.IManifestTokenResolver
{
public string ResolveManifestToken(System.Data.Common.DbConnection connection)
{
return "2008";
}
}
public partial class ScpEntities : DbContext
{
public ScpEntities()
: base("name=ScpEntities")
{
this.Database.CommandTimeout = 120;
}
public ScpEntities(string strConn)
: base(strConn)
{
}
1 year ago
public virtual DbSet<V_TB_REEEE> V_TB_REEEE { set; get; }
public virtual DbSet<TB_SUPPLIER_MAIL> TB_SUPPLIER_MAIL { set; get; }
public virtual DbSet<TA_ProductionLine> TA_ProductionLine { get; set; }
public virtual DbSet<TA_PurchasGroup> TA_PurchasGroup { get; set; }
public virtual DbSet<TA_PinFan> TA_PinFan { get; set; }
public virtual DbSet<TA_BOXTYPE> TA_BOXTYPE { get; set; }
public virtual DbSet<TA_StorageLocation> TA_StorageLocation { get; set; }
public virtual DbSet<TA_Appliance> TA_Appliance { get; set; }
public virtual DbSet<TB_ASN_PARTBOX> TB_ASN_PARTBOX { get; set; }
public virtual DbSet<TB_PALLETS_BTL> TB_PALLETS_BTL { get; set; }
public virtual DbSet<TA_Receiving_Information> TA_Receiving_Information { get; set; }
public virtual DbSet<V_TA_APPLIANCE> V_TA_APPLIANCE { get; set; }
public virtual DbSet<TA_SubPart> TA_SubPart { get; set; }
public virtual DbSet<TB_MAXPO> TB_MAXPO { get; set; }
public virtual DbSet<TB_MAXPO_DETAIL> TB_MAXPO_DETAIL { get; set; }
public virtual DbSet<V_TB_MAXPO> V_TB_MAXPO { get; set; }
public virtual DbSet<V_TB_MAXPO_DETAIL> V_TB_MAXPO_DETAIL { get; set; }
4 years ago
public virtual DbSet<TA_BILLTYPE> TA_BILLTYPE { get; set; }
public virtual DbSet<TA_CONFIG> TA_CONFIG { get; set; }
public virtual DbSet<TA_PART> TA_PART { get; set; }
1 year ago
public virtual DbSet<TA_CarModel> TA_CarModel { get; set; }
public virtual DbSet<TA_SubPartCode> TA_SubPartCode { get; set; }
public virtual DbSet<V_TA_SubPartCode> V_TA_SubPartCode { get; set; }
public virtual DbSet<TA_ASK_SUBPART> TA_ASK_SUBPART { get; set; }
4 years ago
public virtual DbSet<TB_FACTORY> TB_FACTORY { get; set; }
public virtual DbSet<TA_VEND_PART> TA_VEND_PART { get; set; }
public virtual DbSet<TA_VENDER> TA_VENDER { get; set; }
public virtual DbSet<TB_ARRIVE> TB_ARRIVE { get; set; }
public virtual DbSet<TB_ARRIVE_DETAIL> TB_ARRIVE_DETAIL { get; set; }
public virtual DbSet<TB_INVOICE> TB_INVOICE { get; set; }
1 year ago
public virtual DbSet<TB_MAXPO_CONSUME> TB_MAXPO_CONSUME { get; set; }
public virtual DbSet<V_TB_MAXPO_CONSUME> V_TB_MAXPO_CONSUME { get; set; }
4 years ago
public virtual DbSet<TB_INVOICE_DETAIL> TB_INVOICE_DETAIL { get; set; }
public virtual DbSet<TB_RECEIVE> TB_RECEIVE { get; set; }
public virtual DbSet<TB_RECEIVE_DETAIL> TB_RECEIVE_DETAIL { get; set; }
public virtual DbSet<TB_REJECT> TB_REJECT { get; set; }
public virtual DbSet<TB_REJECT_DETAIL> TB_REJECT_DETAIL { get; set; }
public virtual DbSet<TA_FACTORY_CONFIG> TA_FACTORY_CONFIG { get; set; }
public virtual DbSet<TL_BASEDATA> TL_BASEDATA { get; set; }
1 year ago
public virtual DbSet<TL_BILL> TL_BILL { get; set; }
4 years ago
public virtual DbSet<TL_OPER> TL_OPER { get; set; }
public virtual DbSet<TS_BARCODE> TS_BARCODE { get; set; }
public virtual DbSet<V_TS_BARCODE> V_TS_BARCODE { get; set; }
public virtual DbSet<TS_BARCODE_SMALL> TS_BARCODE_SMALL { get; set; }
4 years ago
public virtual DbSet<TS_STOCK> TS_STOCK { get; set; }
public virtual DbSet<TS_UNI_API> TS_UNI_API { get; set; }
1 year ago
public virtual DbSet<TB_PO_SUBDETAIL> TB_PO_SUBDETAIL { get; set; }
public virtual DbSet<V_TB_PO_SUBDETAIL> V_TB_PO_SUBDETAIL { get; set; }
4 years ago
public virtual DbSet<TS_UNI_API_HIS> TS_UNI_API_HIS { get; set; }
public virtual DbSet<TT_CURRENCY> TT_CURRENCY { get; set; }
public virtual DbSet<TT_PROJECT> TT_PROJECT { get; set; }
public virtual DbSet<TT_UNIT> TT_UNIT { get; set; }
public virtual DbSet<V_ReceiveReport> V_ReceiveReport { get; set; }
public virtual DbSet<V_PlanMonth> V_PlanMonth { get; set; }
public virtual DbSet<TB_PlanMonth> TB_PlanMonth { get; set; }
public virtual DbSet<V_Stock> V_Stock { get; set; }
public virtual DbSet<V_INFO> V_INFO { get; set; }
public virtual DbSet<TA_INFO> TA_Info { get; set; }
public virtual DbSet<TB_PublicData> TB_PublicData { get; set; }
public virtual DbSet<TA_BillNoType> TA_BillNoType { get; set; }
public virtual DbSet<TA_VEND_USER> TA_VEND_USER { get; set; }
public virtual DbSet<TA_Part_User> TA_Part_User { get; set; }
public virtual DbSet<TA_REVICE_PORT> TA_REVICE_PORT { get; set; }
public virtual DbSet<TB_PENING_ITEMS> TB_PENING_ITEMS { get; set; }
public virtual DbSet<TB_ASK> TB_ASK { get; set; }
public virtual DbSet<V_TB_ASK> V_TB_ASK { get; set; }
public virtual DbSet<TB_ASK_DETAIL> TB_ASK_DETAIL { get; set; }
public virtual DbSet<V_TB_ASK_DETAIL> V_TB_ASK_DETAIL { get; set; }
1 year ago
public virtual DbSet<TM_CYJ_BOM> TM_CYJ_BOM { get; set; }
4 years ago
public virtual DbSet<TB_PO> TB_PO { get; set; }
public virtual DbSet<TB_PO_DETAIL> TB_PO_DETAIL { get; set; }
public virtual DbSet<TB_ASN> TB_ASN { get; set; }
public virtual DbSet<TB_ASN_DETAIL> TB_ASN_DETAIL { get; set; }
public virtual DbSet<V_TB_PO> V_TB_PO { get; set; }
public virtual DbSet<V_TB_PO_DETAIL> V_TB_PO_DETAIL { get; set; }
public virtual DbSet<V_TB_ASN> V_TB_ASN { get; set; }
public virtual DbSet<V_TB_ASN_DETAIL> V_TB_ASN_DETAIL { get; set; }
public virtual DbSet<TA_LANGUAGE> TA_LANGUAGE { get; set; }
public virtual DbSet<TB_CONTRACT> TB_CONTRACT { get; set; }
public virtual DbSet<TB_CONTRACT_DETAIL> TB_CONTRACT_DETAIL { get; set; }
public virtual DbSet<TB_CONTRACT_DETAIL_PRICE> TB_CONTRACT_DETAIL_PRICE { get; set; }
public virtual DbSet<V_TB_RECEIVE> V_TB_RECEIVE { get; set; }
public virtual DbSet<V_TB_RECEIVE_DETAIL> V_TB_RECEIVE_DETAIL { get; set; }
public virtual DbSet<V_TB_ARRIVE> V_TB_ARRIVE { get; set; }
public virtual DbSet<V_TB_ARRIVE_DETAIL> V_TB_ARRIVE_DETAIL { get; set; }
public virtual DbSet<V_TB_REJECT> V_TB_REJECT { get; set; }
public virtual DbSet<V_TB_REJECT_DETAIL> V_TB_REJECT_DETAIL { get; set; }
public virtual DbSet<TS_BARCODE_RULE> TS_BARCODE_RULE { get; set; }
public virtual DbSet<TS_BARCODE_RULE_SMALL> TS_BARCODE_RULE_SMALL { get; set; }
public virtual DbSet<TB_PALLETS_RULL> TB_PALLETS_RULL { get; set; }
4 years ago
public virtual DbSet<V_TB_INVOICE_DETAIL> V_TB_INVOICE_DETAIL { get; set; }
public virtual DbSet<V_TB_INVOICE> V_TB_INVOICE { get; set; }
public virtual DbSet<V_TB_INVOICE_DETAIL_RED> V_TB_INVOICE_DETAIL_RED { get; set; }
public virtual DbSet<V_TB_INVOICE_RED> V_TB_INVOICE_RED { get; set; }
public virtual DbSet<V_TB_RECEIVE_LIST> V_TB_RECEIVE_LIST { get; set; }
public virtual DbSet<TB_PRINT_COUNT> TB_PRINT_COUNT { get; set; }
public virtual DbSet<V_TB_ASN_DETAIL_VIEW> V_TB_ASN_DETAIL_VIEW { get; set; }
4 years ago
4 years ago
public virtual DbSet<V_TA_VENDER> V_TA_VENDER { get; set; }
public virtual DbSet<V_TB_INCOMPLETE_ASK> V_TB_INCOMPLETE_ASK { get; set; }
public virtual DbSet<V_ARRIVE_PO_REPORT> V_ARRIVE_PO_REPORT { get; set; }
4 years ago
public virtual DbSet<V_TB_PALLET_DETAIL> V_TB_PALLET_DETAIL { get; set; }
public virtual DbSet<V_TB_PALLET> V_TB_PALLET { get; set; }
public virtual DbSet<TB_PALLET_DETAIL> TB_PALLET_DETAIL { get; set; }
public virtual DbSet<TB_PALLET> TB_PALLET { get; set; }
public virtual DbSet<TB_PALLETS> TB_PALLETS { get; set; }
public virtual DbSet<V_TB_PALLETS> V_TB_PALLETS { get; set; }
4 years ago
public virtual DbSet<TB_QUALITY> TB_QUALITY { get; set; }
public virtual DbSet<V_TB_QUALITY> V_TB_QUALITY { get; set; }
public virtual DbSet<V_TB_RETURN> V_TB_RETURN { get; set; }
public virtual DbSet<TB_RETURN> TB_RETURN { get; set; }
public virtual DbSet<V_TB_INVOICE_ASK> V_TB_INVOICE_ASK { get; set; }
public virtual DbSet<V_TB_ASK_DETAIL_PACKAGE> V_TB_ASK_DETAIL_PACKAGE { get; set; }
public virtual DbSet<TS_BARCODE_RULE_CUSTOM> TS_BARCODE_RULE_CUSTOM { get; set; }
public virtual DbSet<TS_BARCODE_CUSTOM> TS_BARCODE_CUSTOM { get; set; }
public virtual DbSet<V_TA_VEND_PART> V_TA_VEND_PART { get; set; }
public virtual DbSet<TB_PRICE> TB_PRICE { get; set; }
1 year ago
public virtual DbSet<TB_NetPrice> TB_NetPrice { get; set; }
4 years ago
public virtual DbSet<TB_FORECAST> TB_FORECAST { get; set; }
public virtual DbSet<V_TB_FORECAST> V_TB_FORECAST { get; set; }
public virtual DbSet<TA_MOLDSHARING> TA_MoldSharing { get; set; }
public virtual DbSet<TA_MOLDSHARING_INVOICE> TA_MoldSharing_Invoice { get; set; }
4 years ago
public virtual DbSet<TB_RECEIVE_DETAIL_QAD> TB_RECEIVE_DETAIL_QAD { get; set; }
public virtual DbSet<TB_RECEIVE_QAD> TB_RECEIVE_QAD { get; set; }
public virtual DbSet<TM_HYANTOLIN_REVIEW> TM_HYANTOLIN_REVIEW { get; set; }
public virtual DbSet<TB_CLAIM_APPEND> TB_CLAIM_APPEND { get; set; }
public virtual DbSet<V_TM_HYANTOLIN_REVIEW> V_TM_HYANTOLIN_REVIEW { get; set; }
public virtual DbSet<TB_PLAN_CUSTOM> TB_PLAN_CUSTOM { get; set; }
public virtual DbSet<TB_PO_PLAN> TB_PO_PLAN { get; set; }
public virtual DbSet<V_TB_PO_PLAN> V_TB_PO_PLAN { get; set; }
public virtual DbSet<V_TB_PO_PLAN_DETAIL> V_TB_PO_PLAN_DETAIL { get; set; }
public virtual DbSet<TB_PO_PLAN_EXTEND> TB_PO_PLAN_EXTEND { get; set; }
public virtual DbSet<V_TB_PO_PLAN_EXTEND> V_TB_PO_PLAN_EXTEND { get; set; }
public virtual DbSet<V_TB_ASK_RECEIVE> V_TB_ASK_RECEIVE { get; set; }
public virtual DbSet<TB_ASK_RECEIVE> TB_ASK_RECEIVE { get; set; }
public virtual DbSet<TB_UNCOMPLETE_TEMPASK> TB_UNCOMPLETE_TEMPASK { get; set; }
public virtual DbSet<TB_MATERIALORDERS> TB_MATERIALORDERS { get; set; }
public virtual DbSet<TB_MATERIALORDERS_DETAIL> TB_MATERIALORDERS_DETAIL { get; set; }
public virtual DbSet<V_TB_MPO> V_TB_MPO { get; set; }
public virtual DbSet<V_TB_MPO_DETAIL> V_TB_MPO_DETAIL { get; set; }
public virtual DbSet<TS_Email> TS_Email { get; set; }
4 years ago
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Entity<TA_MOLDSHARING>()
.Property(e => e.Price)
.HasPrecision(18, 5);
modelBuilder.Entity<TB_INVOICE_DETAIL>()
.Property(e => e.Price)
.HasPrecision(18, 5);
4 years ago
modelBuilder.Entity<TA_REVICE_PORT>()
.Property(e => e.PORT_NO)
.IsUnicode(false);
modelBuilder.Entity<TA_BILLTYPE>()
.Property(e => e.Sep)
.IsUnicode(false);
modelBuilder.Entity<TA_PART>()
.Property(e => e.State)
.IsUnicode(false);
modelBuilder.Entity<TA_VEND_PART>()
.Property(e => e.VendPackQty)
.HasPrecision(18, 2);
modelBuilder.Entity<TB_PRICE>()
.Property(e => e.Amt)
.HasPrecision(18, 5);
1 year ago
modelBuilder.Entity<TB_NetPrice>()
.Property(e => e.Amt)
.HasPrecision(18, 5);
4 years ago
modelBuilder.Entity<TA_VENDER>()
.Property(e => e.VendAbbCode)
.IsUnicode(false);
modelBuilder.Entity<V_TB_PO_DETAIL>()
.Property(e => e.PackQty)
.HasPrecision(19, 2);
1 year ago
modelBuilder.Entity<TB_PO_DETAIL>()
.Property(e => e.PlanQty)
.HasPrecision(19, 6);
modelBuilder.Entity<TB_PO_DETAIL>()
.Property(e => e.PackQty)
.HasPrecision(19, 6);
4 years ago
modelBuilder.Entity<V_TB_PO_DETAIL>()
.Property(e => e.ReceivedQty)
.HasPrecision(19, 2);
1 year ago
modelBuilder.Entity<V_TB_PO_DETAIL>()
.Property(e => e.Price)
.HasPrecision(19, 5);
4 years ago
modelBuilder.Entity<V_TB_ASK_DETAIL>()
.Property(e => e.PackQty)
.HasPrecision(19, 2);
modelBuilder.Entity<V_TB_INVOICE_DETAIL>()
.Property(e => e.Price)
.HasPrecision(18, 5);
modelBuilder.Entity<TB_INVOICE_DETAIL>()
.Property(e => e.Price)
.HasPrecision(18, 5);
modelBuilder.Entity<V_TB_ASK_DETAIL>()
.Property(e => e.AskQty)
.HasPrecision(19, 2);
modelBuilder.Entity<V_TB_ASN_DETAIL>()
.Property(e => e.PackQty)
.HasPrecision(19, 2);
modelBuilder.Entity<V_TB_ASN_DETAIL>()
.Property(e => e.Qty)
.HasPrecision(19, 2);
modelBuilder.Entity<TB_RECEIVE_DETAIL_QAD>()
.Property(e => e.StdCost)
.HasPrecision(18, 5);
modelBuilder.Entity<TB_RECEIVE_DETAIL_QAD>()
.Property(e => e.PurCost)
.HasPrecision(18, 5);
modelBuilder.Entity<TL_BASEDATA>()
.Property(e => e.LogType)
.IsUnicode(false);
modelBuilder.Entity<TL_BASEDATA>()
.Property(e => e.DataType)
.IsUnicode(false);
modelBuilder.Entity<TL_OPER>()
.Property(e => e.LogType)
.IsUnicode(false);
modelBuilder.Entity<TS_BARCODE>()
.Property(e => e.BarCode)
.IsUnicode(false);
modelBuilder.Entity<TS_BARCODE>()
.Property(e => e.FullBarCode)
.IsUnicode(false);
modelBuilder.Entity<TS_BARCODE>()
.Property(e => e.PartCode)
.IsUnicode(false);
modelBuilder.Entity<TS_BARCODE>()
.Property(e => e.VendPartCode)
.IsUnicode(false);
modelBuilder.Entity<TS_BARCODE>()
.Property(e => e.Batch)
.IsUnicode(false);
modelBuilder.Entity<TS_BARCODE>()
.Property(e => e.ProduceDate)
.HasPrecision(3);
modelBuilder.Entity<TS_BARCODE>()
.Property(e => e.SerialNum)
.IsUnicode(false);
modelBuilder.Entity<TS_BARCODE>()
.Property(e => e.Qty)
.HasPrecision(19, 2);
modelBuilder.Entity<TS_BARCODE>()
.Property(e => e.BillNum)
.IsUnicode(false);
modelBuilder.Entity<TS_BARCODE>()
.Property(e => e.VendId)
.IsUnicode(false);
modelBuilder.Entity<TS_BARCODE>()
.Property(e => e.PackQty)
.HasPrecision(19, 2);
modelBuilder.Entity<TS_STOCK>()
.Property(e => e.Qty)
.HasPrecision(19, 2);
modelBuilder.Entity<TS_UNI_API>()
.Property(e => e.Qty)
.HasPrecision(18, 2);
modelBuilder.Entity<TS_UNI_API>()
.Property(e => e.Qty)
.HasPrecision(18,5);
modelBuilder.Entity<TS_UNI_API_HIS>()
.Property(e => e.Qty)
.HasPrecision(18, 2);
modelBuilder.Entity<TS_UNI_API>()
.Property(e => e.Price)
.HasPrecision(18, 5);
modelBuilder.Entity<TS_UNI_API>()
.Property(e => e.TaxAmt)
.HasPrecision(18, 5);
modelBuilder.Entity<TS_UNI_API>()
.Property(e => e.Tax)
.HasPrecision(18, 2);
modelBuilder.Entity<TS_UNI_API>()
.Property(e => e.PackQty)
1 year ago
.HasPrecision(18, 6);
modelBuilder.Entity<TA_SubPartCode>()
.Property(e => e.Qty)
.HasPrecision(18, 6);
modelBuilder.Entity<TB_PO_SUBDETAIL>()
.Property(e => e.Qty)
.HasPrecision(18, 6);
modelBuilder.Entity<TB_PO_SUBDETAIL>()
.Property(e => e.SubQty)
.HasPrecision(18, 6);
modelBuilder.Entity<TA_ASK_SUBPART>()
.Property(e => e.Qty)
.HasPrecision(18, 6);
modelBuilder.Entity<TB_RECEIVE_DETAIL_QAD>()
4 years ago
.Property(e => e.Rate)
.HasPrecision(18, 5);
modelBuilder.Entity<TB_RECEIVE_DETAIL_QAD>()
.Property(e => e.CurAmt)
.HasPrecision(18, 5);
1 year ago
modelBuilder.Entity<TB_MAXPO_DETAIL>()
.Property(e => e.MinordQty)
.HasPrecision(18, 6);
modelBuilder.Entity<TB_MAXPO_DETAIL>()
.Property(e => e.Singlecon)
.HasPrecision(18, 6);
modelBuilder.Entity<TB_MAXPO_DETAIL>()
.Property(e => e.OrderQtyd)
.HasPrecision(18, 6);
modelBuilder.Entity<TB_MAXPO_DETAIL>()
.Property(e => e.OrderQtykg)
.HasPrecision(18, 6);
modelBuilder.Entity<TB_MAXPO_DETAIL>()
.Property(e => e.OrderNumber)
.HasPrecision(18, 6);
modelBuilder.Entity<TB_MAXPO_CONSUME>()
.Property(e => e.PoQty)
.HasPrecision(18, 6);
4 years ago
}
}
}