namespace ShwasherSys.Migrations { using System; using System.Collections.Generic; using System.Data.Entity.Infrastructure.Annotations; using System.Data.Entity.Migrations; public partial class _20241111init : DbMigration { public override void Up() { CreateTable( "dbo.Sys_AppGuids", c => new { Id = c.Int(nullable: false, identity: true), Step = c.Short(nullable: false), LastId = c.Int(nullable: false), IdType = c.Short(nullable: false), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.Sys_AuditLogs", c => new { Id = c.Long(nullable: false, identity: true), UserId = c.Long(), UserName = c.String(), ServiceName = c.String(maxLength: 256), MethodName = c.String(maxLength: 256), Parameters = c.String(maxLength: 1024), ExecutionTime = c.DateTime(nullable: false), ExecutionDuration = c.Int(nullable: false), ClientIpAddress = c.String(maxLength: 64), ClientName = c.String(maxLength: 128), BrowserInfo = c.String(maxLength: 512), Exception = c.String(maxLength: 2000), ImpersonatorUserId = c.Long(), ImpersonatorTenantId = c.Int(), CustomData = c.String(maxLength: 2000), LogType = c.Int(nullable: false), Discriminator = c.String(nullable: false, maxLength: 128), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.BackUpCurrentSemiStoreHouse", c => new { Id = c.Int(nullable: false, identity: true), CurrentSemiStoreHouseNo = c.String(nullable: false, maxLength: 32), ProductionOrderNo = c.String(nullable: false, maxLength: 11), StoreHouseId = c.Int(nullable: false), SemiProductNo = c.String(maxLength: 32), FreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 3), ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 3), ApplyEnterDate = c.DateTime(), Remark = c.String(maxLength: 150), TimeCreated = c.DateTime(), TimeLastMod = c.DateTime(), CreatorUserId = c.String(maxLength: 20), UserIDLastMod = c.String(maxLength: 20), KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.BulletinInfo", c => new { BulletinInfoId = c.Int(nullable: false, identity: true), BulletinType = c.String(nullable: false, maxLength: 1), Title = c.String(nullable: false, maxLength: 100), Content = c.String(nullable: false, storeType: "ntext"), TimeCreated = c.DateTime(storeType: "smalldatetime"), TimeLastMod = c.DateTime(storeType: "smalldatetime"), UserIDLastMod = c.String(maxLength: 20), Promulgator = c.String(maxLength: 50), PromulgatTime = c.DateTime(storeType: "smalldatetime"), ExpirationDate = c.DateTime(storeType: "smalldatetime"), }) .PrimaryKey(t => t.BulletinInfoId); CreateTable( "dbo.BusinessLogs", c => new { Id = c.Int(nullable: false, identity: true), LogType = c.Int(nullable: false), LogCommand = c.String(), LogMessage = c.String(), LogErrorMessage = c.String(), LogDate = c.DateTime(), UserHostAddress = c.String(), Extend1Log = c.String(), Extend2Log = c.String(), Extend3Log = c.String(), Extend4Log = c.String(), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_BusinessLog_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id); CreateTable( "dbo.Currency", c => new { Id = c.String(nullable: false, maxLength: 128), CurrencyName = c.String(maxLength: 20), TimeCreated = c.DateTime(), TimeLastMod = c.DateTime(), UserIDLastMod = c.String(maxLength: 20), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.CurrencyExchangeRate", c => new { Id = c.Int(nullable: false, identity: true), FromCurrencyId = c.String(maxLength: 20), ToCurrencyId = c.String(maxLength: 20), ExchangeRate = c.Decimal(precision: 18, scale: 4), TimeCreated = c.DateTime(), TimeLastMod = c.DateTime(), UserIDLastMod = c.String(maxLength: 20), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.CurrentProductStoreHouse", c => new { Id = c.Int(nullable: false, identity: true), CurrentProductStoreHouseNo = c.String(nullable: false, maxLength: 32), ProductionOrderNo = c.String(maxLength: 11), StoreHouseId = c.Int(nullable: false), StoreLocationNo = c.String(maxLength: 32), ProductNo = c.String(maxLength: 32), FreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 3), Quantity = c.Decimal(nullable: false, precision: 18, scale: 3), Remark = c.String(maxLength: 150), TimeCreated = c.DateTime(), TimeLastMod = c.DateTime(), CreatorUserId = c.String(maxLength: 20), UserIDLastMod = c.String(maxLength: 20), KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3), PreMonthQuantity = c.Decimal(precision: 18, scale: 3), InventoryCheckState = c.Int(), ReturnState = c.Int(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.CurrentRmStoreHouse", c => new { Id = c.String(nullable: false, maxLength: 128), ProductionOrderNo = c.String(maxLength: 11), StoreHouseId = c.Int(nullable: false), StoreLocationNo = c.String(maxLength: 32), RmProductNo = c.String(maxLength: 32), FreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 3), Quantity = c.Decimal(nullable: false, precision: 18, scale: 3), Remark = c.String(maxLength: 150), ProductBatchNum = c.String(maxLength: 32), PreMonthQuantity = c.Decimal(precision: 18, scale: 3), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_CurrentRmStoreHouse_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id); CreateTable( "dbo.CurrentSemiStoreHouse", c => new { Id = c.Int(nullable: false, identity: true), StoreLocationNo = c.String(maxLength: 32), CurrentSemiStoreHouseNo = c.String(nullable: false, maxLength: 32), ProductionOrderNo = c.String(nullable: false, maxLength: 11), StoreHouseId = c.Int(nullable: false), SemiProductNo = c.String(maxLength: 32), FreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 3), ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 3), ApplyEnterDate = c.DateTime(), Remark = c.String(maxLength: 150), TimeCreated = c.DateTime(), TimeLastMod = c.DateTime(), CreatorUserId = c.String(maxLength: 20), UserIDLastMod = c.String(maxLength: 20), KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3), PreMonthQuantity = c.Decimal(precision: 18, scale: 3), InventoryCheckState = c.Int(), ReturnState = c.Int(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.CustomerDefaultProduct", c => new { Id = c.Int(nullable: false, identity: true), CustomerId = c.String(maxLength: 30), ProductNo = c.String(maxLength: 30), CustomerProductName = c.String(maxLength: 30), Sequence = c.Int(nullable: false), TimeLastMod = c.DateTime(storeType: "smalldatetime"), PartNo = c.String(maxLength: 30), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.CustomerDisProductInfo", c => new { Id = c.Int(nullable: false, identity: true), ProductOrderNo = c.String(), CustomerNo = c.String(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }) .PrimaryKey(t => t.Id) .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId) .Index(t => t.CreatorUserId); CreateTable( "dbo.Sys_Users", c => new { Id = c.Long(nullable: false, identity: true), FactoryID = c.String(maxLength: 20), DepartmentID = c.String(maxLength: 20), DutyID = c.Int(), AccountNo = c.String(maxLength: 20), Birthday = c.DateTime(), Address = c.String(maxLength: 200), ZIP = c.String(maxLength: 50), Remark = c.String(maxLength: 500), UserName = c.String(nullable: false, maxLength: 32), UserType = c.Int(nullable: false), AuthenticationSource = c.String(maxLength: 64), EmailAddress = c.String(nullable: false, maxLength: 256), RealName = c.String(nullable: false, maxLength: 32), Password = c.String(nullable: false, maxLength: 128), EmailConfirmationCode = c.String(maxLength: 328), PasswordResetCode = c.String(maxLength: 328), LockoutEndDateUtc = c.DateTime(), AccessFailedCount = c.Int(nullable: false), IsLockoutEnabled = c.Boolean(nullable: false), PhoneNumber = c.String(maxLength: 32), IsPhoneNumberConfirmed = c.Boolean(nullable: false), SecurityStamp = c.String(maxLength: 128), IsTwoFactorEnabled = c.Boolean(nullable: false), IsEmailConfirmed = c.Boolean(nullable: false), IsActive = c.Boolean(nullable: false), LastLoginTime = c.DateTime(), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_SysUser_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id) .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId) .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId) .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId) .Index(t => t.DeleterUserId) .Index(t => t.LastModifierUserId) .Index(t => t.CreatorUserId); CreateTable( "dbo.Sys_UserRoles", c => new { Id = c.Long(nullable: false, identity: true), UserId = c.Long(nullable: false), RoleId = c.Int(nullable: false), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }) .PrimaryKey(t => t.Id) .ForeignKey("dbo.Sys_Users", t => t.UserId, cascadeDelete: true) .Index(t => t.UserId); CreateTable( "dbo.CustomerInvoiceAddress", c => new { Id = c.Int(nullable: false, identity: true), CustomerId = c.String(nullable: false, maxLength: 30), InvoiceAddressName = c.String(nullable: false, maxLength: 150), InvoiceAddress = c.String(nullable: false, maxLength: 250), LinkMan = c.String(maxLength: 30), Telephone = c.String(maxLength: 50), Zip = c.String(maxLength: 8), Email = c.String(maxLength: 50), Mobile = c.String(maxLength: 50), Fax = c.String(maxLength: 50), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_CustomerInvoiceAddress_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id); CreateTable( "dbo.Customers", c => new { CustomerId = c.String(nullable: false, maxLength: 128), CustomerName = c.String(nullable: false, maxLength: 50), LinkMan = c.String(maxLength: 20), Address = c.String(maxLength: 150), WebSite = c.String(maxLength: 50), TimeCreated = c.DateTime(storeType: "smalldatetime"), TimeLastMod = c.DateTime(storeType: "smalldatetime"), UserIDLastMod = c.String(maxLength: 20), IsLock = c.String(nullable: false, maxLength: 1), Telephone = c.String(maxLength: 50), Fax = c.String(maxLength: 50), zip = c.String(maxLength: 6), Email = c.String(maxLength: 200), SaleType = c.Int(), }) .PrimaryKey(t => t.CustomerId); CreateTable( "dbo.CustomerSend", c => new { CustomerSendId = c.Int(nullable: false, identity: true), CustomerId = c.String(nullable: false, maxLength: 30), CustomerSendName = c.String(nullable: false, maxLength: 150), SendAdress = c.String(nullable: false, maxLength: 250), LinkMan = c.String(maxLength: 30), Telephone = c.String(maxLength: 50), Zip = c.String(maxLength: 8), Email = c.String(maxLength: 50), Mobile = c.String(maxLength: 50), Fax = c.String(maxLength: 50), TimeCreated = c.DateTime(storeType: "smalldatetime"), TimeLastMod = c.DateTime(storeType: "smalldatetime"), UserIDLastMod = c.String(maxLength: 20), IsLock = c.String(nullable: false, maxLength: 1), }) .PrimaryKey(t => t.CustomerSendId); CreateTable( "dbo.Departments", c => new { DepartmentID = c.String(nullable: false, maxLength: 128), DepartmentName = c.String(nullable: false, maxLength: 50), Remark = c.String(maxLength: 200), TimeCreated = c.DateTime(storeType: "smalldatetime"), TimeLastMod = c.DateTime(storeType: "smalldatetime"), UserIDLastMod = c.String(maxLength: 20), IsLock = c.String(nullable: false, maxLength: 1), OrderStatusList = c.String(maxLength: 300), }) .PrimaryKey(t => t.DepartmentID); CreateTable( "dbo.DeviceMgPlanInfo", c => new { Id = c.Int(nullable: false, identity: true), No = c.String(maxLength: 50), PlanType = c.Int(nullable: false), DeviceNo = c.String(maxLength: 50), Name = c.String(maxLength: 50), Description = c.String(), ExpireDate = c.DateTime(nullable: false), MaintenanceCycle = c.Int(nullable: false), MaintenanceDate = c.DateTime(nullable: false), NextMaintenanceDate = c.DateTime(), Remark = c.String(maxLength: 500), NumberOfUsers = c.Int(nullable: false), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_DeviceMgPlan_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id) .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId) .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId) .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId) .Index(t => t.DeleterUserId) .Index(t => t.LastModifierUserId) .Index(t => t.CreatorUserId); CreateTable( "dbo.DisqualifiedProductInfo", c => new { Id = c.Int(nullable: false, identity: true), DisqualifiedNo = c.String(maxLength: 20), ProductOrderNo = c.String(maxLength: 11), ReturnOrderNo = c.String(maxLength: 32), ProductNo = c.String(maxLength: 50), ProductName = c.String(maxLength: 100), ProductType = c.Int(nullable: false), QuantityWeight = c.Decimal(nullable: false, precision: 18, scale: 3), KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3), QuantityPcs = c.Decimal(nullable: false, precision: 18, scale: 3), HandleType = c.Int(nullable: false), CheckUser = c.String(maxLength: 20), CheckDate = c.DateTime(), HandleUser = c.String(maxLength: 20), HandleDate = c.DateTime(), DisqualifiedType = c.Int(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }) .PrimaryKey(t => t.Id) .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId) .Index(t => t.CreatorUserId); CreateTable( "dbo.Dutys", c => new { DutyID = c.Int(nullable: false, identity: true), DutyName = c.String(nullable: false, maxLength: 50), Remark = c.String(maxLength: 200), TimeCreated = c.DateTime(storeType: "smalldatetime"), TimeLastMod = c.DateTime(storeType: "smalldatetime"), UserIDLastMod = c.String(maxLength: 20), IsLock = c.String(nullable: false, maxLength: 1), }) .PrimaryKey(t => t.DutyID); CreateTable( "dbo.EmployeeInfo", c => new { Id = c.Int(nullable: false, identity: true), No = c.String(maxLength: 20), Name = c.String(maxLength: 50), CardId = c.String(maxLength: 18), Gender = c.Int(nullable: false), PhoneNumber = c.String(maxLength: 18), DepartmentNo = c.String(maxLength: 20), DutyNo = c.String(maxLength: 20), Description = c.String(maxLength: 500), UserName = c.String(maxLength: 32), Remark = c.String(maxLength: 500), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_Employee_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id) .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId) .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId) .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId) .Index(t => t.DeleterUserId) .Index(t => t.LastModifierUserId) .Index(t => t.CreatorUserId); CreateTable( "dbo.EmployeeWorkPerformanceInfo", c => new { Id = c.Int(nullable: false, identity: true), PerformanceNo = c.String(maxLength: 20), EmployeeId = c.Int(nullable: false), RelatedNo = c.String(maxLength: 20), ProductOrderNo = c.String(maxLength: 11), WorkType = c.Int(nullable: false), Performance = c.Decimal(precision: 18, scale: 3), PerformanceUnit = c.String(maxLength: 10), PerformanceDesc = c.String(maxLength: 500), Remark = c.String(maxLength: 500), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }) .PrimaryKey(t => t.Id) .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId) .ForeignKey("dbo.EmployeeInfo", t => t.EmployeeId, cascadeDelete: true) .Index(t => t.EmployeeId) .Index(t => t.CreatorUserId); CreateTable( "dbo.ExpressLogistics", c => new { Id = c.Int(nullable: false, identity: true), ExpressName = c.String(maxLength: 50), Code = c.String(maxLength: 50), Sort = c.Int(nullable: false), TimeCreated = c.DateTime(storeType: "smalldatetime"), TimeLastMod = c.DateTime(storeType: "smalldatetime"), UserIDLastMod = c.String(maxLength: 50), IsLock = c.String(nullable: false, maxLength: 1), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.ExpressProviderMappers", c => new { Id = c.Int(nullable: false, identity: true), ExpressId = c.Int(nullable: false), ProviderId = c.Int(nullable: false), MapperCode = c.String(maxLength: 50), QueryUrl = c.String(maxLength: 500), ExtendInfo = c.String(maxLength: 500), ActiveStatus = c.Int(), }) .PrimaryKey(t => t.Id) .ForeignKey("dbo.ExpressLogistics", t => t.ExpressId, cascadeDelete: true) .ForeignKey("dbo.ExpressServiceProviders", t => t.ProviderId, cascadeDelete: true) .Index(t => t.ExpressId) .Index(t => t.ProviderId); CreateTable( "dbo.ExpressServiceProviders", c => new { Id = c.Int(nullable: false, identity: true), ProviderName = c.String(maxLength: 50), QueryApiUrl = c.String(maxLength: 150), CallBackUrl = c.String(maxLength: 150), ExcuteNamespaceAndMethod = c.String(maxLength: 150), TimeCreated = c.DateTime(storeType: "smalldatetime"), TimeLastMod = c.DateTime(storeType: "smalldatetime"), UserIDLastMod = c.String(maxLength: 50), IsLock = c.String(nullable: false, maxLength: 1), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.Factories", c => new { FactoryID = c.String(nullable: false, maxLength: 128), FactoryName = c.String(nullable: false, maxLength: 100), ShortNames = c.String(nullable: false, maxLength: 20), RegionID = c.String(nullable: false, maxLength: 50), FactoryURL = c.String(maxLength: 80), Address = c.String(maxLength: 100), ZIP = c.String(maxLength: 50), LinkMan = c.String(maxLength: 50), Telephone = c.String(maxLength: 50), Remark = c.String(maxLength: 200), IsLock = c.String(nullable: false, maxLength: 1), }) .PrimaryKey(t => t.FactoryID); CreateTable( "dbo.FinshedEnterStore", c => new { Id = c.Int(nullable: false, identity: true), ProductionOrderNo = c.String(nullable: false, maxLength: 11), PackageApplyNo = c.String(nullable: false, maxLength: 32), PackageProductNo = c.String(maxLength: 50), ProductNo = c.String(maxLength: 50), StoreHouseId = c.Int(nullable: false), SourceStoreHouseId = c.Int(nullable: false), StoreLocationNo = c.String(maxLength: 32), ApplyStatus = c.Int(nullable: false), IsClose = c.Boolean(nullable: false), ApplySourceType = c.Int(nullable: false), Quantity = c.Decimal(nullable: false, precision: 18, scale: 3), ApplyQuantity = c.Decimal(nullable: false, precision: 18, scale: 3), PackageSpecification = c.Decimal(nullable: false, precision: 18, scale: 3), PackageCount = c.Decimal(nullable: false, precision: 18, scale: 3), ActualPackageCount = c.Decimal(nullable: false, precision: 18, scale: 3), AuditUser = c.String(maxLength: 20), AuditDate = c.DateTime(), ApplyEnterDate = c.DateTime(), EnterStoreUser = c.String(maxLength: 20), EnterStoreDate = c.DateTime(), Remark = c.String(maxLength: 150), TimeCreated = c.DateTime(), TimeLastMod = c.DateTime(), CreatorUserId = c.String(maxLength: 20), UserIDLastMod = c.String(maxLength: 20), KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3), CreateSourceType = c.Int(), PackageEnterNum = c.String(), PackageUser = c.String(maxLength: 20), VerifyUser = c.String(maxLength: 20), ApplyQuantity2 = c.Decimal(nullable: false, precision: 18, scale: 3), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.FixedAssetInfo", c => new { Id = c.Int(nullable: false, identity: true), No = c.String(maxLength: 50), Name = c.String(maxLength: 50), Model = c.String(maxLength: 50), Description = c.String(maxLength: 500), Remark = c.String(maxLength: 500), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_FixedAsset_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id) .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId) .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId) .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId) .Index(t => t.DeleterUserId) .Index(t => t.LastModifierUserId) .Index(t => t.CreatorUserId); CreateTable( "dbo.FixedAssetTypeInfo", c => new { Id = c.String(nullable: false, maxLength: 128), Name = c.String(nullable: false, maxLength: 50), Description = c.String(maxLength: 500), Remark = c.String(maxLength: 500), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_FixedAssetType_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id) .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId) .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId) .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId) .Index(t => t.DeleterUserId) .Index(t => t.LastModifierUserId) .Index(t => t.CreatorUserId); CreateTable( "dbo.Sys_Functions", c => new { Id = c.Int(nullable: false, identity: true), FunctionNo = c.String(maxLength: 100), ParentNo = c.String(maxLength: 100), FunctionName = c.String(maxLength: 100), PermissionName = c.String(maxLength: 500), FunctionType = c.Int(nullable: false), FunctionPath = c.String(maxLength: 500), Action = c.String(maxLength: 50), Controller = c.String(maxLength: 50), Url = c.String(), Icon = c.String(maxLength: 20), Class = c.String(maxLength: 100), Script = c.String(), Sort = c.Int(nullable: false), Depth = c.Int(nullable: false), IsLeaf = c.Boolean(), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_SysFunction_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id) .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId) .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId) .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId) .Index(t => t.DeleterUserId) .Index(t => t.LastModifierUserId) .Index(t => t.CreatorUserId); CreateTable( "dbo.InventoryCheck", c => new { Id = c.String(nullable: false, maxLength: 128), CheckNo = c.String(maxLength: 32), StoreHouseId = c.Int(nullable: false), StoreAreaCode = c.String(maxLength: 32), ShelfNumber = c.String(maxLength: 32), ShelfLevel = c.String(maxLength: 32), SequenceNo = c.String(maxLength: 32), CheckType = c.String(maxLength: 10), PlanStartDate = c.DateTime(), PlanEndDate = c.DateTime(), Remark = c.String(maxLength: 200), CheckUser = c.String(maxLength: 32), PublishUser = c.String(maxLength: 32), FinishDate = c.DateTime(), CheckState = c.Int(nullable: false), ProductNo = c.String(maxLength: 32), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_InventoryCheckInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id); CreateTable( "dbo.InventoryCheckRecord", c => new { Id = c.String(nullable: false, maxLength: 128), CheckNo = c.String(maxLength: 32), CurrentStoreHouseNo = c.String(maxLength: 32), CheckQuantity = c.Decimal(nullable: false, precision: 18, scale: 2), StoreQuantity = c.Decimal(nullable: false, precision: 18, scale: 2), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.LicenseDocumentInfo", c => new { Id = c.Int(nullable: false, identity: true), No = c.String(maxLength: 50), Name = c.String(maxLength: 50), Description = c.String(maxLength: 500), LicenseGroup = c.String(maxLength: 50), LicenseType = c.String(maxLength: 50), FilePath = c.String(maxLength: 300), ExpireDate = c.DateTime(nullable: false), Remark = c.String(maxLength: 500), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_LicenseDocument_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id) .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId) .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId) .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId) .Index(t => t.DeleterUserId) .Index(t => t.LastModifierUserId) .Index(t => t.CreatorUserId); CreateTable( "dbo.LicenseTypeInfo", c => new { Id = c.Int(nullable: false, identity: true), Name = c.String(maxLength: 50), GroupName = c.String(maxLength: 50), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }) .PrimaryKey(t => t.Id) .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId) .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId) .Index(t => t.LastModifierUserId) .Index(t => t.CreatorUserId); CreateTable( "dbo.MaintenanceMemberInfo", c => new { Id = c.String(nullable: false, maxLength: 128), MaintenanceNo = c.String(), EmployeeId = c.Int(nullable: false), Name = c.String(), StartDateTime = c.DateTime(), EndDateTime = c.DateTime(), WorkHour = c.Decimal(nullable: false, precision: 18, scale: 2), IsConfirm = c.Boolean(nullable: false), WorkDesc = c.String(), Remark = c.String(maxLength: 500), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }) .PrimaryKey(t => t.Id) .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId) .ForeignKey("dbo.EmployeeInfo", t => t.EmployeeId, cascadeDelete: true) .Index(t => t.EmployeeId) .Index(t => t.CreatorUserId); CreateTable( "dbo.MaintenanceRecordInfo", c => new { Id = c.String(nullable: false, maxLength: 128), DeviceMgPlanNo = c.String(maxLength: 50), DeviceNo = c.String(maxLength: 50), DeviceName = c.String(maxLength: 50), MgType = c.Int(nullable: false), Description = c.String(maxLength: 500), Address = c.String(maxLength: 200), PlanDate = c.DateTime(nullable: false), CompleteState = c.Int(nullable: false), CompleteDate = c.DateTime(), Remark = c.String(maxLength: 500), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }) .PrimaryKey(t => t.Id) .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId) .Index(t => t.CreatorUserId); CreateTable( "dbo.MoldInfo", c => new { Id = c.Int(nullable: false, identity: true), No = c.String(maxLength: 50), Name = c.String(maxLength: 50), Model = c.String(maxLength: 50), Material = c.String(maxLength: 50), Description = c.String(maxLength: 500), Remark = c.String(maxLength: 500), CustomerName = c.String(maxLength: 50), ShelfNum = c.String(maxLength: 50), OuterDiameter = c.String(maxLength: 50), InsideDiameter = c.String(maxLength: 50), Thickness = c.String(maxLength: 50), Height = c.String(maxLength: 50), Rigidity = c.String(maxLength: 50), MaintenanceCycle = c.Int(nullable: false), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_Mold_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id) .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId) .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId) .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId) .Index(t => t.DeleterUserId) .Index(t => t.LastModifierUserId) .Index(t => t.CreatorUserId); CreateTable( "dbo.MoldProductionRecord", c => new { Id = c.Long(nullable: false, identity: true), MoldNo = c.String(nullable: false, maxLength: 50), ProductionOrderNo = c.String(nullable: false, maxLength: 11), Quantity = c.Int(nullable: false), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }) .PrimaryKey(t => t.Id) .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId) .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId) .Index(t => t.LastModifierUserId) .Index(t => t.CreatorUserId); CreateTable( "dbo.OrderHeader", c => new { OrderNo = c.String(nullable: false, maxLength: 128), CustomerId = c.String(nullable: false, maxLength: 30), LinkName = c.String(nullable: false, maxLength: 50), OrderDate = c.DateTime(nullable: false, storeType: "smalldatetime"), Fax = c.String(maxLength: 50), Telephone = c.String(maxLength: 50), CustomerSendId = c.Int(nullable: false), StockNo = c.String(maxLength: 50), OrderStatusId = c.Int(nullable: false), TimeCreated = c.DateTime(storeType: "smalldatetime"), TimeLastMod = c.DateTime(storeType: "smalldatetime"), UserIDLastMod = c.String(maxLength: 30), SaleType = c.Int(), SaleMan = c.String(maxLength: 50), IsLock = c.String(maxLength: 1), }) .PrimaryKey(t => t.OrderNo); CreateTable( "dbo.OrderItems", c => new { OrderItemId = c.Int(nullable: false, identity: true), OrderNo = c.String(nullable: false, maxLength: 30), ProductNo = c.String(nullable: false, maxLength: 30), Price = c.Decimal(nullable: false, storeType: "money"), AfterTaxPrice = c.Decimal(nullable: false, storeType: "money"), CurrencyId = c.String(nullable: false, maxLength: 10), Quantity = c.Decimal(nullable: false, precision: 18, scale: 3, storeType: "numeric"), OrderUnitId = c.Int(nullable: false), SendDate = c.DateTime(nullable: false, storeType: "smalldatetime"), IsReport = c.String(nullable: false, maxLength: 1), IsPartSend = c.String(nullable: false, maxLength: 1), OrderItemStatusId = c.Int(), WareHouse = c.String(maxLength: 50), OrderItemDesc = c.String(maxLength: 500), TimeCreated = c.DateTime(storeType: "smalldatetime"), TimeLastMod = c.DateTime(storeType: "smalldatetime"), UserIDLastMod = c.String(maxLength: 20), PartNo = c.String(maxLength: 30), ToCnyRate = c.Decimal(precision: 18, scale: 3), EmergencyLevel = c.Int(nullable: false), IsLock = c.String(maxLength: 1), StandardName = c.String(maxLength: 50), StoreCompleteState = c.Int(nullable: false), LogisticsFee = c.Decimal(nullable: false, precision: 18, scale: 2), MoldFee = c.Decimal(nullable: false, precision: 18, scale: 2), LogisticsFeeAfterTax = c.Decimal(nullable: false, precision: 18, scale: 2), MoldFeeAfterTax = c.Decimal(nullable: false, precision: 18, scale: 2), }) .PrimaryKey(t => t.OrderItemId); CreateTable( "dbo.OrderProduction", c => new { Id = c.Int(nullable: false, identity: true), OrderItemId = c.Int(nullable: false), ProductionOrderNo = c.String(maxLength: 11), Remark = c.String(maxLength: 150), TimeCreated = c.DateTime(), CreatorUserId = c.String(maxLength: 20), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.OrderSendBills", c => new { OrderSendBillNo = c.String(nullable: false, maxLength: 128), CustomerId = c.String(nullable: false, maxLength: 30), SendDate = c.DateTime(storeType: "smalldatetime"), SendAddress = c.String(maxLength: 250), ContactTels = c.String(maxLength: 50), ContactMan = c.String(maxLength: 50), TimeCreated = c.DateTime(storeType: "smalldatetime"), TimeLastMod = c.DateTime(storeType: "smalldatetime"), UserIDLastMod = c.String(maxLength: 20), IsDoBill = c.String(maxLength: 1), ExpressId = c.Int(), ExpressBillNo = c.String(maxLength: 50), }) .PrimaryKey(t => t.OrderSendBillNo); CreateTable( "dbo.OrderSendExceed", c => new { Id = c.Int(nullable: false, identity: true), OrderItemId = c.Int(nullable: false), ExceedQuantity = c.Decimal(nullable: false, precision: 18, scale: 3, storeType: "numeric"), OperatorMan = c.String(maxLength: 30), OrderNo = c.String(), ProductNo = c.String(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.OrderSend", c => new { OrderSendId = c.Int(nullable: false, identity: true), OrderItemId = c.Int(nullable: false), SendDate = c.DateTime(storeType: "smalldatetime"), SendQuantity = c.Decimal(nullable: false, precision: 18, scale: 3), OrderUnitId = c.Int(), Remark = c.String(maxLength: 250), OrderSendBillNo = c.String(maxLength: 20), OrderStickBillNo = c.String(maxLength: 40), TimeCreated = c.DateTime(storeType: "smalldatetime"), TimeLastMod = c.DateTime(storeType: "smalldatetime"), UserIDLastMod = c.String(maxLength: 20), CreatorUserId = c.String(maxLength: 20), QuantityPerPack = c.Decimal(precision: 18, scale: 3), PackageCount = c.Decimal(precision: 18, scale: 3), ProductBatchNum = c.String(), StoreLocationNo = c.String(maxLength: 32), CurrentProductStoreHouseNo = c.String(), StatementBillNo = c.String(maxLength: 32), LogisticsFee = c.Decimal(nullable: false, precision: 18, scale: 2), MoldFee = c.Decimal(nullable: false, precision: 18, scale: 2), LogisticsFeeAfterTax = c.Decimal(nullable: false, precision: 18, scale: 2), MoldFeeAfterTax = c.Decimal(nullable: false, precision: 18, scale: 2), SendBillSort = c.Int(nullable: false), StatementBillSort = c.Int(nullable: false), }) .PrimaryKey(t => t.OrderSendId); CreateTable( "dbo.OrderStickBills", c => new { OrderStickBillNo = c.String(nullable: false, maxLength: 128), CustomerId = c.String(nullable: false, maxLength: 30), CreatDate = c.DateTime(storeType: "smalldatetime"), StickNum = c.String(maxLength: 30), StickMan = c.String(maxLength: 20), Description = c.String(maxLength: 4000), TimeCreated = c.DateTime(storeType: "smalldatetime"), TimeLastMod = c.DateTime(storeType: "smalldatetime"), UserIDLastMod = c.String(maxLength: 20), InvoiceState = c.Int(), Amount = c.Decimal(precision: 18, scale: 2), OriginalStickNum = c.String(maxLength: 30), ReturnOrderNo = c.String(maxLength: 30), OrderNo = c.String(maxLength: 500), InvoiceType = c.Int(nullable: false), }) .PrimaryKey(t => t.OrderStickBillNo); CreateTable( "dbo.OrderUnit", c => new { OrderUnitId = c.Int(nullable: false, identity: true), OrderUnitName = c.String(maxLength: 50), ProductNum = c.Int(), OrderUnitDesc = c.String(maxLength: 250), TimeCreated = c.DateTime(storeType: "smalldatetime"), TimeLastMod = c.DateTime(storeType: "smalldatetime"), UserIDLastMod = c.String(), }) .PrimaryKey(t => t.OrderUnitId); CreateTable( "dbo.OutFactory", c => new { OutFactoryId = c.String(nullable: false, maxLength: 128), OutFactoryName = c.String(nullable: false, maxLength: 50), LinkMan = c.String(maxLength: 20), Address = c.String(maxLength: 150), WebSite = c.String(maxLength: 50), TimeCreated = c.DateTime(storeType: "smalldatetime"), TimeLastMod = c.DateTime(storeType: "smalldatetime"), UserIDLastMod = c.String(maxLength: 20), IsLock = c.String(nullable: false, maxLength: 1), Telephone = c.String(maxLength: 50), Fax = c.String(maxLength: 50), zip = c.String(maxLength: 6), Email = c.String(maxLength: 200), }) .PrimaryKey(t => t.OutFactoryId); CreateTable( "dbo.PackageApply", c => new { Id = c.Int(nullable: false, identity: true), PackageApplyNo = c.String(nullable: false, maxLength: 32), CurrentStoreHouseNo = c.String(maxLength: 32), ProductionOrderNo = c.String(nullable: false, maxLength: 11), SemiProductNo = c.String(maxLength: 32), ProductNo = c.String(maxLength: 32), ApplyQuantity = c.Decimal(nullable: false, precision: 18, scale: 3), ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 3), SourceStore = c.Int(nullable: false), ApplyStatus = c.String(nullable: false, maxLength: 1), IsClose = c.Boolean(nullable: false), ApplyDate = c.DateTime(), Remark = c.String(maxLength: 150), TimeCreated = c.DateTime(), TimeLastMod = c.DateTime(), CreatorUserId = c.String(maxLength: 20), UserIDLastMod = c.String(maxLength: 20), KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.Sys_Permissions", c => new { Id = c.Long(nullable: false, identity: true), PermissionNo = c.String(maxLength: 32), PermissionName = c.String(maxLength: 500), Master = c.Int(), MasterValue = c.String(), Access = c.Int(), AccessValue = c.String(), IsGranted = c.Boolean(nullable: false), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.ProductInspectInfos", c => new { Id = c.Int(nullable: false, identity: true), ProductInspectReportNo = c.String(nullable: false, maxLength: 32), ProductInspectNo = c.String(nullable: false, maxLength: 32), ProductionOrderNo = c.String(nullable: false, maxLength: 11), SemiProductNo = c.String(maxLength: 32), InspectStatus = c.Int(nullable: false), InspectSubject = c.String(maxLength: 50), InspectResult = c.Int(nullable: false), InspectDate = c.DateTime(), InspectMember = c.String(maxLength: 100), IsLock = c.String(maxLength: 1), InspectContent = c.String(maxLength: 1000), TimeCreated = c.DateTime(), TimeLastMod = c.DateTime(), CreatorUserId = c.String(maxLength: 20), UserIDLastMod = c.String(maxLength: 20), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.ProductInspectReportInfos", c => new { Id = c.Int(nullable: false, identity: true), ProductInspectReportNo = c.String(nullable: false, maxLength: 32), ProductionOrderNo = c.String(nullable: false, maxLength: 11), SemiProductNo = c.String(maxLength: 32), ConfirmStatus = c.Int(nullable: false), InspectCount = c.Int(nullable: false), ConfirmDate = c.DateTime(), ConfirmUser = c.String(maxLength: 100), InspectContent = c.String(maxLength: 1000), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.ProductionOrderLogInfo", c => new { Id = c.Int(nullable: false, identity: true), ProductionNo = c.String(maxLength: 20), ProductOrderNo = c.String(maxLength: 11), EmployeeId = c.Int(nullable: false), CarNo = c.String(maxLength: 20), QuantityWeight = c.Decimal(nullable: false, precision: 18, scale: 3), KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3), QuantityPcs = c.Decimal(nullable: false, precision: 18, scale: 3), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }) .PrimaryKey(t => t.Id) .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId) .ForeignKey("dbo.EmployeeInfo", t => t.EmployeeId, cascadeDelete: true) .Index(t => t.EmployeeId) .Index(t => t.CreatorUserId); CreateTable( "dbo.ProductionOrders", c => new { Id = c.Int(nullable: false, identity: true), ProductionOrderNo = c.String(nullable: false, maxLength: 11), ProductionOrderStatus = c.Int(nullable: false), StoveNo = c.String(maxLength: 20), CarNo = c.String(maxLength: 20), SemiProductNo = c.String(maxLength: 32), Quantity = c.Decimal(nullable: false, precision: 18, scale: 3), RawMaterials = c.String(maxLength: 100), Material = c.String(maxLength: 50), PartNo = c.String(maxLength: 50), Model = c.String(maxLength: 50), SurfaceColor = c.String(maxLength: 50), Rigidity = c.String(maxLength: 50), Size = c.String(maxLength: 50), ProcessingType = c.String(maxLength: 1), ProcessingLevel = c.String(maxLength: 1), Remark = c.String(maxLength: 150), IsChecked = c.Int(), TimeCreated = c.DateTime(), TimeLastMod = c.DateTime(), CreatorUserId = c.String(maxLength: 20), UserIDLastMod = c.String(maxLength: 20), IsLock = c.String(maxLength: 1), SourceProductionOrderNo = c.String(maxLength: 11), PlanProduceDate = c.DateTime(), EnterQuantity = c.Decimal(nullable: false, precision: 18, scale: 3), ProductionType = c.String(maxLength: 1), KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3), OutsourcingFactory = c.String(), EnterDate = c.DateTime(), InspectDate = c.DateTime(), HasExported = c.Boolean(nullable: false), MaxQuantity = c.Decimal(nullable: false, precision: 18, scale: 3), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.ProductMapper", c => new { Id = c.Int(nullable: false, identity: true), ProductNo = c.String(maxLength: 50), PreProductNo = c.String(maxLength: 50), PreProductType = c.Int(nullable: false), NewProductType = c.Int(nullable: false), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_ProductMapper_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id); CreateTable( "dbo.ProductOutStore", c => new { Id = c.Int(nullable: false, identity: true), ProductionOrderNo = c.String(maxLength: 11), CurrentProductStoreHouseNo = c.String(maxLength: 32), ProductNo = c.String(maxLength: 50), StoreHouseId = c.Int(nullable: false), ApplyStatus = c.Int(nullable: false), IsClose = c.Boolean(nullable: false), IsConfirm = c.Boolean(), Quantity = c.Decimal(nullable: false, precision: 18, scale: 3), ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 3), AuditUser = c.String(maxLength: 20), AuditDate = c.DateTime(), OutStoreUser = c.String(maxLength: 20), OutStoreDate = c.DateTime(), ApplyOutDate = c.DateTime(), Remark = c.String(maxLength: 150), TimeCreated = c.DateTime(), TimeLastMod = c.DateTime(), CreatorUserId = c.String(maxLength: 20), UserIDLastMod = c.String(maxLength: 20), OrderSendId = c.Int(nullable: false), KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3), ApplyOutStoreSourceType = c.Int(nullable: false), CreateSourceType = c.Int(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.ProductProperties", c => new { Id = c.Int(nullable: false, identity: true), PropertyType = c.String(maxLength: 50), PropertyNo = c.String(maxLength: 50), PropertyValue = c.String(maxLength: 50), DisplayValue = c.String(maxLength: 150), ContentInfo = c.String(maxLength: 250), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_ProductProperty_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id); CreateTable( "dbo.Products", c => new { ProductNo = c.String(nullable: false, maxLength: 128), ProductName = c.String(nullable: false, maxLength: 50), Model = c.String(maxLength: 50), StandardId = c.Int(), Material = c.String(maxLength: 50), ProductDesc = c.String(maxLength: 200), SurfaceColor = c.String(maxLength: 50), Rigidity = c.String(maxLength: 50), TimeCreated = c.DateTime(storeType: "smalldatetime"), TimeLastMod = c.DateTime(storeType: "smalldatetime"), UserIDLastMod = c.String(maxLength: 20), Sequence = c.Int(nullable: false), IsStandard = c.String(nullable: false, maxLength: 1), IsLock = c.String(nullable: false, maxLength: 1), Defprice = c.Decimal(storeType: "money"), TranUnitValue = c.Decimal(precision: 18, scale: 3), PartNo = c.String(maxLength: 50), SpecialDesc = c.String(maxLength: 50), ModelNo = c.String(maxLength: 20), MaterialNo = c.String(maxLength: 20), SurfaceColorNo = c.String(maxLength: 20), RigidityNo = c.String(maxLength: 20), SpecialNo = c.String(maxLength: 20), PrevProductNo = c.String(maxLength: 50), }) .PrimaryKey(t => t.ProductNo); CreateTable( "dbo.ProductInspectReportContents", c => new { Id = c.Int(nullable: false, identity: true), ProductionOrderNo = c.String(maxLength: 32), PtoductInspectNo = c.String(maxLength: 32), ReportContent = c.String(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.QualityIssueLabelInfo", c => new { Id = c.String(nullable: false, maxLength: 128), Name = c.String(nullable: false, maxLength: 50), Description = c.String(maxLength: 500), Remark = c.String(maxLength: 500), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_QualityIssueLabel_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id) .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId) .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId) .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId) .Index(t => t.DeleterUserId) .Index(t => t.LastModifierUserId) .Index(t => t.CreatorUserId); CreateTable( "dbo.Regions", c => new { RegionID = c.String(nullable: false, maxLength: 128), RegionName = c.String(nullable: false, maxLength: 50), FatherRegionID = c.String(nullable: false, maxLength: 50), URL = c.String(maxLength: 80), Depth = c.Int(nullable: false), IsLeaf = c.String(nullable: false, maxLength: 1), Sort = c.Int(nullable: false), Path = c.String(nullable: false, maxLength: 220), TimeCreated = c.DateTime(storeType: "smalldatetime"), TimeLastMod = c.DateTime(storeType: "smalldatetime"), UserIDLastMod = c.String(maxLength: 20), IsLock = c.String(nullable: false, maxLength: 1), }) .PrimaryKey(t => t.RegionID); CreateTable( "dbo.ReturnGoodOrder", c => new { Id = c.Int(nullable: false, identity: true), ReturnOrderNo = c.String(maxLength: 32), SendOrderNo = c.String(maxLength: 32), OrderNo = c.String(maxLength: 32), OrderItemNo = c.String(maxLength: 32), ProductNo = c.String(maxLength: 32), ProductionOrderNo = c.String(maxLength: 32), CustomerId = c.String(maxLength: 32), Reason = c.String(maxLength: 500), Amount = c.Decimal(precision: 18, scale: 2), AuditAmount = c.Decimal(precision: 18, scale: 2), Quantity = c.Decimal(precision: 18, scale: 3), HandleUser = c.String(maxLength: 32), ApplyUser = c.String(maxLength: 32), ConfirmUser = c.String(maxLength: 32), ReturnDate = c.DateTime(), ApplyDate = c.DateTime(), ConfirmDate = c.DateTime(), ReturnState = c.Int(nullable: false), ReturnType = c.Int(nullable: false), LinkName = c.String(maxLength: 50), SurveyReason = c.String(maxLength: 500), SurveyDetail = c.String(maxLength: 500), Solution = c.String(maxLength: 500), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_ReturnGoodOrder_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id) .Index(t => t.ReturnOrderNo, unique: true); CreateTable( "dbo.RmEnterStore", c => new { Id = c.String(nullable: false, maxLength: 128), ProductionOrderNo = c.String(maxLength: 11), RmProductNo = c.String(maxLength: 50), StoreHouseId = c.Int(nullable: false), StoreLocationNo = c.String(maxLength: 32), ApplyStatus = c.Int(nullable: false), IsClose = c.Boolean(nullable: false), Quantity = c.Decimal(nullable: false, precision: 18, scale: 3), ApplyQuantity = c.Decimal(nullable: false, precision: 18, scale: 3), AuditUser = c.String(maxLength: 32), AuditDate = c.DateTime(), ApplyEnterDate = c.DateTime(), EnterStoreUser = c.String(maxLength: 32), EnterStoreDate = c.DateTime(), Remark = c.String(maxLength: 150), ProductBatchNum = c.String(maxLength: 32), CreateSourceType = c.Int(nullable: false), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_RmEnterStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id); CreateTable( "dbo.RmOutStore", c => new { Id = c.String(nullable: false, maxLength: 128), ProductionOrderNo = c.String(maxLength: 11), CurrentRmStoreHouseNo = c.String(maxLength: 32), RmProductNo = c.String(maxLength: 50), StoreHouseId = c.Int(nullable: false), ApplyStatus = c.Int(nullable: false), IsClose = c.Boolean(nullable: false), IsConfirm = c.Boolean(), Quantity = c.Decimal(nullable: false, precision: 18, scale: 3), ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 3), AuditUser = c.String(maxLength: 150), AuditDate = c.DateTime(), OutStoreUser = c.String(maxLength: 150), OutStoreDate = c.DateTime(), ApplyOutDate = c.DateTime(), Remark = c.String(maxLength: 150), ProductBatchNum = c.String(maxLength: 32), CreateSourceType = c.Int(nullable: false), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_RmOutStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id); CreateTable( "dbo.RmProduct", c => new { Id = c.String(nullable: false, maxLength: 128), ProductName = c.String(maxLength: 50), Material = c.String(maxLength: 50), Model = c.String(maxLength: 50), ProductDesc = c.String(maxLength: 200), ModelNo = c.String(maxLength: 20), MaterialNo = c.String(maxLength: 20), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_RmProduct_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id); CreateTable( "dbo.Sys_Roles", c => new { Id = c.Int(nullable: false, identity: true), Name = c.String(nullable: false, maxLength: 32), RoleDisplayName = c.String(nullable: false, maxLength: 64), Description = c.String(maxLength: 1000), RoleType = c.Int(nullable: false), IsStatic = c.Boolean(nullable: false), IsDefault = c.Boolean(nullable: false), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_SysRole_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id) .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId) .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId) .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId) .Index(t => t.DeleterUserId) .Index(t => t.LastModifierUserId) .Index(t => t.CreatorUserId); CreateTable( "dbo.ScheduleOrderSend", c => new { Id = c.Int(nullable: false, identity: true), OrderItemId = c.Int(nullable: false), Remark = c.String(maxLength: 500), PlanQuantity = c.Decimal(precision: 18, scale: 2), SendUser = c.String(maxLength: 32), PlanDate = c.DateTime(), SendState = c.Int(nullable: false), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.N_ViewScheduleOrderSend", c => new { Id = c.Int(nullable: false, identity: true), OrderItemId = c.Int(nullable: false), PlanQuantity = c.Decimal(precision: 18, scale: 2), SendUser = c.String(), Remark = c.String(), PlanDate = c.DateTime(), SendState = c.Int(nullable: false), OrderNo = c.String(), ProductNo = c.String(), ProductName = c.String(), Model = c.String(), Material = c.String(), SurfaceColor = c.String(), Rigidity = c.String(), CustomerName = c.String(), CustomerId = c.String(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.ScrapEnterStore", c => new { Id = c.String(nullable: false, maxLength: 128), ProductionOrderNo = c.String(maxLength: 11), ProductNo = c.String(maxLength: 50), StoreHouseId = c.Int(nullable: false), StoreLocationNo = c.String(maxLength: 32), ApplyStatus = c.Int(nullable: false), IsClose = c.Boolean(nullable: false), Quantity = c.Decimal(nullable: false, precision: 18, scale: 3), ApplyQuantity = c.Decimal(nullable: false, precision: 18, scale: 3), AuditUser = c.String(maxLength: 32), AuditDate = c.DateTime(), ApplyEnterDate = c.DateTime(), EnterStoreUser = c.String(maxLength: 32), EnterStoreDate = c.DateTime(), Remark = c.String(maxLength: 150), ProductType = c.Int(nullable: false), ScrapSource = c.Int(nullable: false), ScrapSourceNo = c.String(maxLength: 50), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_ScrapEnterStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id); CreateTable( "dbo.ScrapTypeInfo", c => new { Id = c.String(nullable: false, maxLength: 128), Name = c.String(nullable: false, maxLength: 50), Description = c.String(maxLength: 500), Remark = c.String(maxLength: 500), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_ScrapType_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id) .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId) .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId) .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId) .Index(t => t.DeleterUserId) .Index(t => t.LastModifierUserId) .Index(t => t.CreatorUserId); CreateTable( "dbo.SemiEnterStore", c => new { Id = c.Int(nullable: false, identity: true), ProductionOrderNo = c.String(nullable: false, maxLength: 11), StoreHouseId = c.Int(nullable: false), ApplyStatus = c.String(nullable: false, maxLength: 5), IsClose = c.Boolean(nullable: false), ApplySource = c.String(nullable: false, maxLength: 5), SemiProductNo = c.String(maxLength: 32), Quantity = c.Decimal(nullable: false, precision: 18, scale: 3), ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 3), AuditUser = c.String(maxLength: 20), AuditDate = c.DateTime(), EnterStoreUser = c.String(maxLength: 20), EnterStoreDate = c.DateTime(), ApplyEnterDate = c.DateTime(), Remark = c.String(maxLength: 150), TimeCreated = c.DateTime(), TimeLastMod = c.DateTime(), CreatorUserId = c.String(maxLength: 20), UserIDLastMod = c.String(maxLength: 20), KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3), CreateSourceType = c.Int(), StoreLocationNo = c.String(maxLength: 32), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.SemiOutStores", c => new { Id = c.Int(nullable: false, identity: true), ProductionOrderNo = c.String(nullable: false, maxLength: 11), CurrentSemiStoreHouseNo = c.String(maxLength: 32), StoreHouseId = c.Int(nullable: false), ApplyStatus = c.String(nullable: false, maxLength: 5), ApplyTypes = c.Int(nullable: false), IsClose = c.Boolean(nullable: false), ApplyOutStoreSource = c.String(nullable: false, maxLength: 5), IsConfirm = c.Boolean(), SemiProductNo = c.String(maxLength: 32), Quantity = c.Decimal(nullable: false, precision: 18, scale: 3), ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 3), ApplyOutDate = c.DateTime(), Remark = c.String(maxLength: 150), TimeCreated = c.DateTime(), TimeLastMod = c.DateTime(), CreatorUserId = c.String(maxLength: 20), UserIDLastMod = c.String(maxLength: 20), AuditUser = c.String(maxLength: 20), AuditDate = c.DateTime(), OutStoreUser = c.String(maxLength: 20), OutStoreDate = c.DateTime(), KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3), CreateSourceType = c.Int(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.SemiProducts", c => new { SemiProductNo = c.String(nullable: false, maxLength: 128), SemiProductName = c.String(maxLength: 50), Model = c.String(maxLength: 50), Material = c.String(maxLength: 50), ProductDesc = c.String(maxLength: 200), SurfaceColor = c.String(maxLength: 50), Rigidity = c.String(maxLength: 50), TimeCreated = c.DateTime(storeType: "smalldatetime"), TimeLastMod = c.DateTime(storeType: "smalldatetime"), UserIDLastMod = c.String(maxLength: 20), IsStandard = c.String(nullable: false, maxLength: 1), Sequence = c.Int(nullable: false), IsLock = c.String(nullable: false, maxLength: 1), PartNo = c.String(maxLength: 50), TranUnitValue = c.Decimal(precision: 18, scale: 3), SpecialDesc = c.String(maxLength: 50), ModelNo = c.String(maxLength: 20), MaterialNo = c.String(maxLength: 20), SurfaceColorNo = c.String(maxLength: 20), RigidityNo = c.String(maxLength: 20), SpecialNo = c.String(maxLength: 20), PrevProductNo = c.String(maxLength: 50), }) .PrimaryKey(t => t.SemiProductNo); CreateTable( "dbo.SemiProductStore", c => new { Id = c.Int(nullable: false, identity: true), StoreHouseId = c.Int(nullable: false), SemiProductNo = c.String(maxLength: 32), Quantity = c.Decimal(nullable: false, precision: 18, scale: 3), StoreYear = c.String(maxLength: 5), StoreMonth = c.String(maxLength: 4), Active = c.String(nullable: false, maxLength: 1), Remark = c.String(maxLength: 150), TimeCreated = c.DateTime(), TimeLastMod = c.DateTime(), CreatorUserId = c.String(maxLength: 20), UserIDLastMod = c.String(maxLength: 20), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.Sys_Settings", c => new { Id = c.Int(nullable: false, identity: true), SettingNo = c.String(maxLength: 32), SettingName = c.String(maxLength: 50), SettingType = c.Int(nullable: false), Code = c.String(maxLength: 100), Value = c.String(maxLength: 500), Description = c.String(maxLength: 1000), Remark = c.String(maxLength: 1000), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_SysSetting_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id) .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId) .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId) .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId) .Index(t => t.DeleterUserId) .Index(t => t.LastModifierUserId) .Index(t => t.CreatorUserId); CreateTable( "dbo.ShortMessage", c => new { MsgID = c.Int(nullable: false, identity: true), SendUserID = c.String(nullable: false, maxLength: 20), Title = c.String(maxLength: 100), Content = c.String(maxLength: 3000), SendTime = c.DateTime(storeType: "smalldatetime"), IsDelete = c.String(nullable: false, maxLength: 1), RecieveUserIds = c.String(maxLength: 400), }) .PrimaryKey(t => t.MsgID); CreateTable( "dbo.ShortMsgDetail", c => new { DetailID = c.Int(nullable: false, identity: true), MsgID = c.Int(nullable: false), RecvUserID = c.String(nullable: false, maxLength: 20), IsRead = c.String(nullable: false, maxLength: 1), }) .PrimaryKey(t => t.DetailID); CreateTable( "dbo.StandardCatalog", c => new { Id = c.Int(nullable: false, identity: true), StandardNo = c.String(maxLength: 50), StandardAbbr = c.String(nullable: false, maxLength: 50), StandardAbbrName = c.String(nullable: false, maxLength: 50), StandardName = c.String(nullable: false, maxLength: 150), Rigidity = c.String(maxLength: 250), Param = c.String(maxLength: 250), Drawing = c.String(), Remark = c.String(maxLength: 250), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_StandardCatalog_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id); CreateTable( "dbo.StandardDetail", c => new { Id = c.Int(nullable: false, identity: true), StandardId = c.Int(nullable: false), Specs = c.String(nullable: false, maxLength: 50), StandardName = c.String(nullable: false, maxLength: 150), InnerDiameter1 = c.Decimal(precision: 18, scale: 2), InnerDiameter2 = c.Decimal(precision: 18, scale: 2), OutDiameter1 = c.Decimal(precision: 18, scale: 2), OutDiameter2 = c.Decimal(precision: 18, scale: 2), Thickness1 = c.Decimal(precision: 18, scale: 2), Thickness2 = c.Decimal(precision: 18, scale: 2), Height1 = c.Decimal(precision: 18, scale: 2), Height2 = c.Decimal(precision: 18, scale: 2), InnerChamfer1 = c.Decimal(precision: 18, scale: 2), InnerChamfer2 = c.Decimal(precision: 18, scale: 2), OutChamfer1 = c.Decimal(precision: 18, scale: 2), OutChamfer2 = c.Decimal(precision: 18, scale: 2), ThousandWeigh = c.Decimal(precision: 18, scale: 2), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_StandardDetail_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id); CreateTable( "dbo.Standard", c => new { StandardId = c.Int(nullable: false, identity: true), StandardName = c.String(nullable: false, maxLength: 50), StandardDesc = c.String(maxLength: 150), TimeCreated = c.DateTime(storeType: "smalldatetime"), TimeLastMod = c.DateTime(storeType: "smalldatetime"), UserIDLastMod = c.String(maxLength: 20), }) .PrimaryKey(t => t.StandardId); CreateTable( "dbo.StatementBill", c => new { Id = c.Int(nullable: false, identity: true), StatementBillNo = c.String(nullable: false, maxLength: 30), CustomerId = c.String(nullable: false, maxLength: 30), BillMan = c.String(maxLength: 20), Description = c.String(maxLength: 4000), StatementState = c.Int(), OrderStickBillNo = c.String(maxLength: 30), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }) .PrimaryKey(t => t.Id) .Index(t => t.StatementBillNo, unique: true); CreateTable( "dbo.StoreHouseLocation", c => new { Id = c.Int(nullable: false, identity: true), StoreLocationNo = c.String(maxLength: 32), StoreAreaCode = c.String(maxLength: 32), ShelfNumber = c.String(maxLength: 50), ShelfLevel = c.String(maxLength: 10), SequenceNo = c.String(maxLength: 10), Remark = c.String(maxLength: 250), StoreHouseId = c.Int(), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_StoreHouseLocation_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id); CreateTable( "dbo.StoreHouse", c => new { StoreHouseID = c.Int(nullable: false, identity: true), StoreHouseName = c.String(nullable: false, maxLength: 50), StoreHouseTypeId = c.Int(), Address = c.String(maxLength: 250), Tel = c.String(maxLength: 50), Fax = c.String(maxLength: 50), ContactMan = c.String(maxLength: 50), Remark = c.String(maxLength: 500), IsLock = c.String(maxLength: 1), TimeCreated = c.DateTime(storeType: "smalldatetime"), TimeLastMod = c.DateTime(storeType: "smalldatetime"), UserIDLastMod = c.String(maxLength: 20), StoreHouseNo = c.String(maxLength: 20), }) .PrimaryKey(t => t.StoreHouseID); CreateTable( "dbo.Sys_AttachFiles", c => new { Id = c.Int(nullable: false, identity: true), AttachNo = c.String(maxLength: 32), TableName = c.String(maxLength: 50), ColumnName = c.String(maxLength: 50), SourceKey = c.String(maxLength: 50), FileTitle = c.String(maxLength: 50), FileName = c.String(maxLength: 50), FilePath = c.String(maxLength: 500), FileType = c.String(maxLength: 20), FileExt = c.String(maxLength: 10), Description = c.String(maxLength: 500), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.Sys_Helps", c => new { HelpId = c.Int(nullable: false, identity: true), Classification = c.String(maxLength: 40), HelpTitle = c.String(nullable: false, maxLength: 20), HelpKeyWords = c.String(maxLength: 20), HelpContent = c.String(storeType: "ntext"), Sequence = c.Int(nullable: false), TimeCreated = c.DateTime(storeType: "smalldatetime"), TimeLastMod = c.DateTime(storeType: "smalldatetime"), UserIDLastMod = c.String(maxLength: 20), }) .PrimaryKey(t => t.HelpId); CreateTable( "dbo.Sys_States", c => new { Id = c.Int(nullable: false, identity: true), StateNo = c.String(maxLength: 32), StateName = c.String(maxLength: 50), TableName = c.String(nullable: false, maxLength: 50), ColumnName = c.String(nullable: false, maxLength: 50), CodeValue = c.String(nullable: false, maxLength: 100), DisplayValue = c.String(nullable: false, maxLength: 100), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_SysState_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id) .ForeignKey("dbo.Sys_Users", t => t.CreatorUserId) .ForeignKey("dbo.Sys_Users", t => t.DeleterUserId) .ForeignKey("dbo.Sys_Users", t => t.LastModifierUserId) .Index(t => t.DeleterUserId) .Index(t => t.LastModifierUserId) .Index(t => t.CreatorUserId); CreateTable( "dbo.TemplateInfos", c => new { Id = c.Int(nullable: false, identity: true), TemplateNo = c.String(maxLength: 50), Name = c.String(maxLength: 50), Description = c.String(maxLength: 500), Content = c.String(), Type = c.Int(nullable: false), TempKey = c.String(maxLength: 50), FilePath = c.String(maxLength: 300), FileExt = c.String(maxLength: 50), ClassPath = c.String(maxLength: 100), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.Sys_UserLoginLogs", c => new { Id = c.Long(nullable: false, identity: true), UserId = c.Long(), UserNameOrEmailAddress = c.String(maxLength: 255), ClientIpAddress = c.String(maxLength: 64), ClientName = c.String(maxLength: 128), BrowserInfo = c.String(maxLength: 512), Result = c.Byte(nullable: false), CreationTime = c.DateTime(nullable: false), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.Sys_UserLogins", c => new { Id = c.Long(nullable: false, identity: true), UserId = c.Long(nullable: false), LoginProvider = c.String(nullable: false, maxLength: 128), ProviderKey = c.String(nullable: false, maxLength: 256), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.v_BookedProductNum", c => new { ProductNo = c.String(nullable: false, maxLength: 128), BookedQuantity = c.Decimal(precision: 18, scale: 2), }) .PrimaryKey(t => t.ProductNo); CreateTable( "dbo.v_CanProductStore", c => new { ProductNo = c.String(nullable: false, maxLength: 128), CanUserQuantity = c.Decimal(precision: 18, scale: 2), }) .PrimaryKey(t => t.ProductNo); CreateTable( "dbo.N_ViewCurrentProductStoreHouse", c => new { Id = c.Int(nullable: false, identity: true), CurrentProductStoreHouseNo = c.String(nullable: false), ProductionOrderNo = c.String(nullable: false), StoreHouseId = c.Int(nullable: false), StoreLocationNo = c.String(), ProductNo = c.String(), FreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 2), Quantity = c.Decimal(nullable: false, precision: 18, scale: 2), ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 2), Remark = c.String(maxLength: 150), TimeCreated = c.DateTime(), TimeLastMod = c.DateTime(), CreatorUserId = c.String(maxLength: 20), UserIDLastMod = c.String(maxLength: 20), ProductName = c.String(maxLength: 50), Model = c.String(maxLength: 20), Material = c.String(maxLength: 50), SurfaceColor = c.String(maxLength: 50), Rigidity = c.String(maxLength: 50), IsStandard = c.String(maxLength: 1), ProductDesc = c.String(), PartNo = c.String(), KgWeight = c.Decimal(nullable: false, precision: 18, scale: 2), PreMonthQuantity = c.Decimal(precision: 18, scale: 3), InventoryCheckState = c.Int(), ReturnState = c.Int(), StoreAreaCode = c.String(), ShelfNumber = c.String(), ShelfLevel = c.String(), SequenceNo = c.String(), LocationRemark = c.String(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.N_ViewCurrentRmStoreHouse", c => new { Id = c.String(nullable: false, maxLength: 128), ProductionOrderNo = c.String(maxLength: 11), StoreHouseId = c.Int(nullable: false), StoreLocationNo = c.String(maxLength: 32), RmProductNo = c.String(maxLength: 32), FreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 3), Quantity = c.Decimal(nullable: false, precision: 18, scale: 3), Remark = c.String(maxLength: 150), PreMonthQuantity = c.Decimal(precision: 18, scale: 3), ProductName = c.String(), Material = c.String(), Model = c.String(), ProductDesc = c.String(), StoreHouseName = c.String(), ProductBatchNum = c.String(), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_ViewCurrentRmStoreHouse_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id); CreateTable( "dbo.N_ViewCurrentSemiStoreHouse", c => new { Id = c.Int(nullable: false, identity: true), CurrentSemiStoreHouseNo = c.String(nullable: false, maxLength: 32), ProductionOrderNo = c.String(nullable: false, maxLength: 11), StoreHouseId = c.Int(nullable: false), SemiProductNo = c.String(maxLength: 32), FreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 2), ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 2), ApplyEnterDate = c.DateTime(), Remark = c.String(maxLength: 150), TimeCreated = c.DateTime(), TimeLastMod = c.DateTime(), CreatorUserId = c.String(maxLength: 20), UserIDLastMod = c.String(maxLength: 20), SemiProductName = c.String(maxLength: 50), Model = c.String(maxLength: 20), PartNo = c.String(), Material = c.String(maxLength: 50), SurfaceColor = c.String(maxLength: 50), Rigidity = c.String(maxLength: 50), IsStandard = c.String(maxLength: 1), KgWeight = c.Decimal(nullable: false, precision: 18, scale: 2), StoreLocationNo = c.String(), PreMonthQuantity = c.Decimal(precision: 18, scale: 3), InventoryCheckState = c.Int(), ReturnState = c.Int(), StoreAreaCode = c.String(), ShelfNumber = c.String(), ShelfLevel = c.String(), SequenceNo = c.String(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.v_SemiProductStoreInfo", c => new { Id = c.String(nullable: false, maxLength: 128), AllQuantity = c.Decimal(nullable: false, precision: 18, scale: 2), AllFreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 2), AllPreMonthQuantity = c.Decimal(precision: 18, scale: 2), SemiProductName = c.String(), Model = c.String(), Material = c.String(), SurfaceColor = c.String(), Rigidity = c.String(), PartNo = c.String(), ProductDesc = c.String(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.v_ProductStoreInfo", c => new { ProductNo = c.String(nullable: false, maxLength: 128), AllQuantity = c.Decimal(nullable: false, precision: 18, scale: 2), AllFreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 2), AllPreMonthQuantity = c.Decimal(precision: 18, scale: 2), ProductName = c.String(), Model = c.String(), Material = c.String(), SurfaceColor = c.String(), Rigidity = c.String(), PartNo = c.String(), Defprice = c.Decimal(precision: 18, scale: 3), }) .PrimaryKey(t => t.ProductNo); CreateTable( "dbo.v_customerstick", c => new { OrderSendId = c.Int(nullable: false, identity: true), OrderNo = c.String(), StockNo = c.String(), OrderSendBillNo = c.String(), SendDate = c.DateTime(), PartNo = c.String(), Model = c.String(), SurfaceColor = c.String(), Rigidity = c.String(), SendQuantity = c.Decimal(precision: 18, scale: 2), OrderUnitId = c.Int(), Price = c.Decimal(precision: 18, scale: 2), total = c.Decimal(precision: 18, scale: 2), CustomerId = c.String(), OrderUnitName = c.String(), IsDoBill = c.String(), Remark = c.String(), OrderStickBillNo = c.String(), StatementBillNo = c.String(), }) .PrimaryKey(t => t.OrderSendId); CreateTable( "dbo.N_ViewDisqualifiedProduction", c => new { Id = c.Int(nullable: false, identity: true), DisqualifiedNo = c.String(maxLength: 20), ProductOrderNo = c.String(maxLength: 11), ReturnOrderNo = c.String(maxLength: 32), ProductNo = c.String(maxLength: 50), ProductName = c.String(maxLength: 100), ProductType = c.Int(nullable: false), QuantityWeight = c.Decimal(nullable: false, precision: 18, scale: 3), KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3), QuantityPcs = c.Decimal(nullable: false, precision: 18, scale: 3), HandleType = c.Int(nullable: false), CheckUser = c.String(maxLength: 20), CheckDate = c.DateTime(), HandleUser = c.String(maxLength: 20), HandleDate = c.DateTime(), DisqualifiedType = c.Int(), CreationTime = c.DateTime(nullable: false), Model = c.String(), Material = c.String(), SurfaceColor = c.String(), Rigidity = c.String(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.N_ViewDisqualifiedReturn", c => new { Id = c.Int(nullable: false, identity: true), DisqualifiedNo = c.String(maxLength: 20), ProductOrderNo = c.String(maxLength: 11), ReturnOrderNo = c.String(maxLength: 32), ProductNo = c.String(maxLength: 50), ProductName = c.String(maxLength: 100), ProductType = c.Int(nullable: false), QuantityWeight = c.Decimal(nullable: false, precision: 18, scale: 3), KgWeight = c.Decimal(nullable: false, precision: 18, scale: 3), QuantityPcs = c.Decimal(nullable: false, precision: 18, scale: 3), HandleType = c.Int(nullable: false), CheckUser = c.String(maxLength: 20), CheckDate = c.DateTime(), HandleUser = c.String(maxLength: 20), HandleDate = c.DateTime(), DisqualifiedType = c.Int(), CreationTime = c.DateTime(nullable: false), Model = c.String(), Material = c.String(), SurfaceColor = c.String(), Rigidity = c.String(), CustomerId = c.String(), CustomerName = c.String(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.NV_ViewEmployeeInfo", c => new { Id = c.Int(nullable: false, identity: true), No = c.String(), Name = c.String(), CardId = c.String(), Gender = c.Int(nullable: false), PhoneNumber = c.String(), DepartmentNo = c.String(), DepartmentName = c.String(), DutyNo = c.String(), DutyName = c.String(), Description = c.String(), UserName = c.String(), Remark = c.String(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.vEnterOutLogDetail_c", c => new { Id = c.String(nullable: false, maxLength: 128), ActualId = c.Int(nullable: false), EnterOutFlag = c.Int(nullable: false), ProductNo = c.String(), StoreHouseId = c.Int(nullable: false), Quantity = c.Decimal(nullable: false, precision: 18, scale: 2), DateTiem = c.DateTime(), UserIDLastMod = c.String(), Remark = c.String(), ProductName = c.String(), Model = c.String(), Material = c.String(), SurfaceColor = c.String(), Rigidity = c.String(), PartNo = c.String(), CustomerId = c.String(), CustomerName = c.String(), ProductionOrderNo = c.String(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.v_Store_Query", c => new { Id = c.String(nullable: false, maxLength: 128), ActualId = c.Int(nullable: false), EnterOutFlag = c.Int(nullable: false), ProductNo = c.String(), StoreHouseId = c.Int(nullable: false), Quantity = c.Decimal(nullable: false, precision: 18, scale: 2), DateTiem = c.DateTime(), UserIDLastMod = c.String(), Remark = c.String(), ProductName = c.String(), Model = c.String(), Material = c.String(), SurfaceColor = c.String(), Rigidity = c.String(), PartNo = c.String(), AllQuantity = c.Decimal(precision: 18, scale: 2), AllFreezeQuantity = c.Decimal(precision: 18, scale: 2), AllPreMonthQuantity = c.Decimal(precision: 18, scale: 2), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.v_EnterOutSemiProductStore", c => new { Id = c.String(nullable: false, maxLength: 128), ActualId = c.Int(nullable: false), EnterOutFlag = c.Int(nullable: false), SemiProductNo = c.String(), StoreHouseId = c.Int(nullable: false), Quantity = c.Decimal(nullable: false, precision: 18, scale: 2), DateTiem = c.DateTime(), UserIDLastMod = c.String(), Remark = c.String(), SemiProductName = c.String(), Model = c.String(), Material = c.String(), SurfaceColor = c.String(), Rigidity = c.String(), PartNo = c.String(), ProductDesc = c.String(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.N_ViewInventoryCheckRecord_Product", c => new { Id = c.String(nullable: false, maxLength: 128), ProductNo = c.String(), ProductName = c.String(), Model = c.String(), Material = c.String(), SurfaceColor = c.String(), Rigidity = c.String(), ProductDesc = c.String(), CheckNo = c.String(), CurrentStoreHouseNo = c.String(), CheckQuantity = c.Decimal(nullable: false, precision: 18, scale: 2), StoreQuantity = c.Decimal(nullable: false, precision: 18, scale: 2), FreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 2), Quantity = c.Decimal(nullable: false, precision: 18, scale: 2), StoreLocationNo = c.String(), StoreHouseId = c.Int(nullable: false), ProductionOrderNo = c.String(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.N_ViewInventoryCheckRecord_Semi", c => new { Id = c.String(nullable: false, maxLength: 128), ProductNo = c.String(), ProductName = c.String(), Model = c.String(), Material = c.String(), SurfaceColor = c.String(), Rigidity = c.String(), ProductDesc = c.String(), CheckNo = c.String(), CurrentStoreHouseNo = c.String(), CheckQuantity = c.Decimal(nullable: false, precision: 18, scale: 2), StoreQuantity = c.Decimal(nullable: false, precision: 18, scale: 2), FreezeQuantity = c.Decimal(nullable: false, precision: 18, scale: 2), Quantity = c.Decimal(nullable: false, precision: 18, scale: 2), StoreLocationNo = c.String(), StoreHouseId = c.Int(nullable: false), ProductionOrderNo = c.String(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.N_ViewOrderItems", c => new { OrderItemId = c.Int(nullable: false, identity: true), OrderNo = c.String(), ProductNo = c.String(), Price = c.Decimal(nullable: false, storeType: "money"), AfterTaxPrice = c.Decimal(nullable: false, storeType: "money"), CurrencyId = c.String(), Quantity = c.Decimal(nullable: false, precision: 18, scale: 2, storeType: "numeric"), OrderUnitId = c.Int(nullable: false), SendDate = c.DateTime(nullable: false, storeType: "smalldatetime"), IsReport = c.String(), IsPartSend = c.String(), OrderItemStatusId = c.Int(), WareHouse = c.String(), OrderItemDesc = c.String(), PartNo = c.String(), TotalPrice = c.Decimal(nullable: false, precision: 18, scale: 2), CustomerId = c.String(), LinkName = c.String(), OrderDate = c.DateTime(storeType: "smalldatetime"), Fax = c.String(), Telephone = c.String(), ProductName = c.String(), Model = c.String(), StandardId = c.Int(), Material = c.String(), SurfaceColor = c.String(), Rigidity = c.String(), IsStandard = c.String(), IsSendQuantity = c.Decimal(precision: 18, scale: 2), OrderUnitName = c.String(), StockNo = c.String(), CustomerName = c.String(), AfterTaxTotalPrice = c.Decimal(nullable: false, precision: 18, scale: 2), SaleType = c.Int(), SaleMan = c.String(), EmergencyLevel = c.Int(nullable: false), IsLock = c.String(), StandardName = c.String(), StoreCompleteState = c.Int(nullable: false), LogisticsFee = c.Decimal(nullable: false, precision: 18, scale: 2), MoldFee = c.Decimal(nullable: false, precision: 18, scale: 2), LogisticsFeeAfterTax = c.Decimal(nullable: false, precision: 18, scale: 2), MoldFeeAfterTax = c.Decimal(nullable: false, precision: 18, scale: 2), }) .PrimaryKey(t => t.OrderItemId); CreateTable( "dbo.v_OrderSendBill", c => new { OrderSendBillNo = c.String(nullable: false, maxLength: 128), CustomerId = c.String(), SendDate = c.DateTime(), SendAddress = c.String(), ContactTels = c.String(), ContactMan = c.String(), TimeCreated = c.DateTime(), TimeLastMod = c.DateTime(), UserIDLastMod = c.String(), IsDoBill = c.String(), OrderSendCount = c.Int(nullable: false), StatementCount = c.Int(nullable: false), ExpressId = c.Int(), ExpressBillNo = c.String(), ExpressName = c.String(), CreatorUserId = c.String(), TotalPrice = c.Decimal(precision: 18, scale: 3), AfterTaxTotalPrice = c.Decimal(precision: 18, scale: 3), CurrencyId = c.String(), }) .PrimaryKey(t => t.OrderSendBillNo); CreateTable( "dbo.N_ViewOrderSends", c => new { OrderSendId = c.Int(nullable: false, identity: true), OrderItemId = c.Int(nullable: false), SendDate = c.DateTime(), SendQuantity = c.Decimal(nullable: false, precision: 18, scale: 2), Remark = c.String(), OrderSendBillNo = c.String(), OrderStickBillNo = c.String(), QuantityPerPack = c.Decimal(precision: 18, scale: 2), PackageCount = c.Decimal(precision: 18, scale: 2), ProductBatchNum = c.String(), UserIDLastMod = c.String(), OrderNo = c.String(), ProductNo = c.String(), Price = c.Decimal(nullable: false, precision: 18, scale: 2), TotalPrice = c.Decimal(nullable: false, precision: 18, scale: 2), IsReport = c.String(), PartNo = c.String(), ProductName = c.String(), Model = c.String(), StandardId = c.Int(), Material = c.String(), ProductDesc = c.String(), SurfaceColor = c.String(), Rigidity = c.String(), CustomerId = c.String(), CustomerName = c.String(), LinkName = c.String(), OrderDate = c.DateTime(), CustomerSendId = c.Int(), StockNo = c.String(), OrderUnitName = c.String(), SaleType = c.Int(), AfterTaxPrice = c.Decimal(nullable: false, precision: 18, scale: 2), StatementBillNo = c.String(), SendActionDate = c.DateTime(), StandardName = c.String(), LogisticsFee = c.Decimal(nullable: false, precision: 18, scale: 2), MoldFee = c.Decimal(nullable: false, precision: 18, scale: 2), LogisticsFeeAfterTax = c.Decimal(nullable: false, precision: 18, scale: 2), MoldFeeAfterTax = c.Decimal(nullable: false, precision: 18, scale: 2), SendBillSort = c.Int(nullable: false), StatementBillSort = c.Int(nullable: false), }) .PrimaryKey(t => t.OrderSendId); CreateTable( "dbo.vwOrderSendBill", c => new { OrderSendId = c.Int(nullable: false, identity: true), OrderItemId = c.Int(nullable: false), SendDate = c.DateTime(), SendQuantity = c.Decimal(precision: 18, scale: 2), Remark = c.String(), OrderSendBillNo = c.String(), OrderStickBillNo = c.String(), StatementBillNo = c.String(), UserIDLastMod = c.String(), OrderNo = c.String(), ProductNo = c.String(), Price = c.Decimal(nullable: false, precision: 18, scale: 2), totalprice = c.Decimal(nullable: false, precision: 18, scale: 2), IsReport = c.String(), PartNo = c.String(), ProductName = c.String(), Model = c.String(), StandardId = c.Int(), Material = c.String(), ProductDesc = c.String(), SurfaceColor = c.String(), Rigidity = c.String(), CustomerId = c.String(), LinkName = c.String(), OrderDate = c.DateTime(), CustomerSendId = c.Int(nullable: false), StockNo = c.String(), OrderUnitName = c.String(), CurrencyId = c.String(), AfterTaxPrice = c.Decimal(nullable: false, precision: 18, scale: 2), LogisticsFee = c.Decimal(nullable: false, precision: 18, scale: 2), MoldFee = c.Decimal(nullable: false, precision: 18, scale: 2), LogisticsFeeAfterTax = c.Decimal(nullable: false, precision: 18, scale: 2), MoldFeeAfterTax = c.Decimal(nullable: false, precision: 18, scale: 2), AfterTaxTotalprice = c.Decimal(nullable: false, precision: 18, scale: 2), SendBillSort = c.Int(nullable: false), StatementBillSort = c.Int(nullable: false), }) .PrimaryKey(t => t.OrderSendId); CreateTable( "dbo.N_ViewPackageApply", c => new { Id = c.Int(nullable: false, identity: true), PackageApplyNo = c.String(), CurrentStoreHouseNo = c.String(), ProductionOrderNo = c.String(), SemiProductNo = c.String(), ProductNo = c.String(), ApplyQuantity = c.Decimal(nullable: false, precision: 18, scale: 3), ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 3), SourceStore = c.Int(nullable: false), ApplyStatus = c.String(), IsClose = c.Boolean(nullable: false), ApplyDate = c.DateTime(), Remark = c.String(), TimeCreated = c.DateTime(), TimeLastMod = c.DateTime(), CreatorUserId = c.String(), UserIDLastMod = c.String(), ProcessingNum = c.Int(nullable: false), IsApplyEnterQuantity = c.Decimal(precision: 18, scale: 2), IsApplyEnterQuantity2 = c.Decimal(precision: 18, scale: 2), KgWeight = c.Decimal(precision: 18, scale: 2), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.N_ViewProductEnterStore", c => new { Id = c.Int(nullable: false, identity: true), ProductionOrderNo = c.String(maxLength: 11), PackageApplyNo = c.String(nullable: false), PackageProductNo = c.String(maxLength: 32), ProductNo = c.String(), StoreHouseId = c.Int(nullable: false), StoreLocationNo = c.String(), ApplyStatus = c.Int(nullable: false), IsClose = c.Boolean(nullable: false), ApplySourceType = c.Int(nullable: false), Quantity = c.Decimal(nullable: false, precision: 18, scale: 2), PackageSpecification = c.Decimal(nullable: false, precision: 18, scale: 2), PackageCount = c.Decimal(nullable: false, precision: 18, scale: 2), ActualPackageCount = c.Decimal(nullable: false, precision: 18, scale: 2), AuditUser = c.String(), AuditDate = c.DateTime(), ApplyEnterDate = c.DateTime(), Remark = c.String(), TimeCreated = c.DateTime(), TimeLastMod = c.DateTime(), CreatorUserId = c.String(), UserIDLastMod = c.String(), ProductName = c.String(), Model = c.String(maxLength: 20), Material = c.String(maxLength: 50), SurfaceColor = c.String(maxLength: 50), Rigidity = c.String(maxLength: 50), IsStandard = c.String(maxLength: 1), KgWeight = c.Decimal(nullable: false, precision: 18, scale: 2), SourceStoreHouseId = c.Int(nullable: false), CreateSourceType = c.Int(), PackageEnterNum = c.String(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.N_ViewProductOutStore", c => new { Id = c.Int(nullable: false, identity: true), ProductionOrderNo = c.String(), CurrentProductStoreHouseNo = c.String(), StoreHouseId = c.Int(nullable: false), ApplyStatus = c.Int(nullable: false), IsClose = c.Boolean(), IsConfirm = c.Boolean(), ProductNo = c.String(), Quantity = c.Decimal(nullable: false, precision: 18, scale: 2), ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 2), ApplyOutDate = c.DateTime(), Remark = c.String(), TimeCreated = c.DateTime(), TimeLastMod = c.DateTime(), CreatorUserId = c.String(), UserIDLastMod = c.String(), AuditUser = c.String(), AuditDate = c.DateTime(), ProductName = c.String(), Model = c.String(), Material = c.String(), SurfaceColor = c.String(), Rigidity = c.String(), IsStandard = c.String(), CustomerId = c.String(), CustomerName = c.String(), OrderSendBillNo = c.String(), KgWeight = c.Decimal(nullable: false, precision: 18, scale: 2), ApplyOutStoreSourceType = c.Int(nullable: false), CreateSourceType = c.Int(), OrderDate = c.DateTime(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.v_QueryCurrentProductNum", c => new { ProductNo = c.String(nullable: false, maxLength: 128), BookedQuantity = c.Decimal(precision: 18, scale: 2), CanUserQuantity = c.Decimal(precision: 18, scale: 2), }) .PrimaryKey(t => t.ProductNo); CreateTable( "dbo.N_ViewRmEnterStore", c => new { Id = c.String(nullable: false, maxLength: 128), ProductionOrderNo = c.String(nullable: false, maxLength: 11), RmProductNo = c.String(maxLength: 50), StoreHouseId = c.Int(nullable: false), StoreLocationNo = c.String(maxLength: 32), ApplyStatus = c.Int(nullable: false), IsClose = c.Boolean(nullable: false), Quantity = c.Decimal(nullable: false, precision: 18, scale: 3), ApplyQuantity = c.Decimal(nullable: false, precision: 18, scale: 3), AuditUser = c.String(maxLength: 32), AuditDate = c.DateTime(), ApplyEnterDate = c.DateTime(), EnterStoreUser = c.String(maxLength: 32), EnterStoreDate = c.DateTime(), Remark = c.String(maxLength: 150), ProductName = c.String(), Material = c.String(), Model = c.String(), ProductDesc = c.String(), StoreHouseName = c.String(), ProductBatchNum = c.String(), CreateSourceType = c.Int(), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_ViewRmEnterStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id); CreateTable( "dbo.N_ViewRmOutStore", c => new { Id = c.String(nullable: false, maxLength: 128), ProductionOrderNo = c.String(maxLength: 11), CurrentRmStoreHouseNo = c.String(maxLength: 32), RmProductNo = c.String(maxLength: 50), StoreHouseId = c.Int(nullable: false), ApplyStatus = c.Int(nullable: false), IsClose = c.Boolean(nullable: false), IsConfirm = c.Boolean(), Quantity = c.Decimal(nullable: false, precision: 18, scale: 3), ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 3), AuditUser = c.String(maxLength: 150), AuditDate = c.DateTime(), OutStoreUser = c.String(maxLength: 150), OutStoreDate = c.DateTime(), ApplyOutDate = c.DateTime(), Remark = c.String(maxLength: 150), ProductName = c.String(), Material = c.String(), Model = c.String(), ProductDesc = c.String(), StoreHouseName = c.String(), ProductBatchNum = c.String(), CreateSourceType = c.Int(), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_ViewRmOutStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id); CreateTable( "dbo.N_ViewScrapEnterStore", c => new { Id = c.String(nullable: false, maxLength: 128), ProductionOrderNo = c.String(nullable: false, maxLength: 11), ProductNo = c.String(maxLength: 50), StoreHouseId = c.Int(nullable: false), StoreLocationNo = c.String(maxLength: 32), ApplyStatus = c.Int(nullable: false), IsClose = c.Boolean(nullable: false), Quantity = c.Decimal(nullable: false, precision: 18, scale: 3), ApplyQuantity = c.Decimal(nullable: false, precision: 18, scale: 3), AuditUser = c.String(maxLength: 32), AuditDate = c.DateTime(), ApplyEnterDate = c.DateTime(), EnterStoreUser = c.String(maxLength: 32), EnterStoreDate = c.DateTime(), Remark = c.String(maxLength: 150), ProductName = c.String(), Material = c.String(), Model = c.String(), ProductDesc = c.String(), StoreHouseName = c.String(), SurfaceColor = c.String(), Rigidity = c.String(), ProductType = c.Int(), ScrapSource = c.Int(nullable: false), ScrapSourceNo = c.String(), IsDeleted = c.Boolean(nullable: false), DeleterUserId = c.Long(), DeletionTime = c.DateTime(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }, annotations: new Dictionary { { "DynamicFilter_ViewScrapEnterStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }) .PrimaryKey(t => t.Id); CreateTable( "dbo.N_ViewSemiEnterStore", c => new { Id = c.Int(nullable: false, identity: true), ProductionOrderNo = c.String(nullable: false, maxLength: 11), StoreHouseId = c.Int(nullable: false), ApplyStatus = c.String(nullable: false, maxLength: 1), IsClose = c.Boolean(), ApplySource = c.String(nullable: false, maxLength: 1), SemiProductNo = c.String(maxLength: 32), Quantity = c.Decimal(nullable: false, precision: 18, scale: 2), ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 2), AuditUser = c.String(maxLength: 20), AuditDate = c.DateTime(), ApplyEnterDate = c.DateTime(), Remark = c.String(maxLength: 150), TimeCreated = c.DateTime(), TimeLastMod = c.DateTime(), CreatorUserId = c.String(maxLength: 20), UserIDLastMod = c.String(maxLength: 20), SemiProductName = c.String(maxLength: 50), Model = c.String(maxLength: 20), Material = c.String(maxLength: 50), SurfaceColor = c.String(maxLength: 50), Rigidity = c.String(maxLength: 50), IsStandard = c.String(maxLength: 1), PartNo = c.String(maxLength: 50), TranUnitValue = c.Decimal(precision: 18, scale: 2), KgWeight = c.Decimal(nullable: false, precision: 18, scale: 2), CreateSourceType = c.Int(), StoreLocationNo = c.String(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.N_ViewSemiOutStore", c => new { Id = c.Int(nullable: false, identity: true), ProductionOrderNo = c.String(), CurrentSemiStoreHouseNo = c.String(), StoreHouseId = c.Int(nullable: false), ApplyStatus = c.String(), ApplyTypes = c.Int(nullable: false), IsClose = c.Boolean(), IsConfirm = c.Boolean(), ApplyOutStoreSource = c.String(), SemiProductNo = c.String(), Quantity = c.Decimal(nullable: false, precision: 18, scale: 2), ActualQuantity = c.Decimal(nullable: false, precision: 18, scale: 2), ApplyOutDate = c.DateTime(), Remark = c.String(), TimeCreated = c.DateTime(), TimeLastMod = c.DateTime(), CreatorUserId = c.String(), UserIDLastMod = c.String(), AuditUser = c.String(), AuditDate = c.DateTime(), SemiProductName = c.String(), Model = c.String(), Material = c.String(), SurfaceColor = c.String(), Rigidity = c.String(), IsStandard = c.String(), PartNo = c.String(), TranUnitValue = c.Decimal(precision: 18, scale: 2), KgWeight = c.Decimal(nullable: false, precision: 18, scale: 2), CreateSourceType = c.Int(), }) .PrimaryKey(t => t.Id); CreateTable( "dbo.N_ViewStatementBill", c => new { Id = c.Int(nullable: false, identity: true), StatementBillNo = c.String(nullable: false, maxLength: 30), CustomerId = c.String(nullable: false, maxLength: 30), BillMan = c.String(maxLength: 20), Description = c.String(maxLength: 4000), StatementState = c.Int(), CustomerName = c.String(), OrderStickBillNo = c.String(), TotalPrice = c.Decimal(precision: 18, scale: 3), AfterTaxTotalPrice = c.Decimal(precision: 18, scale: 3), CurrencyId = c.String(), LastModificationTime = c.DateTime(), LastModifierUserId = c.Long(), CreationTime = c.DateTime(nullable: false), CreatorUserId = c.Long(), }) .PrimaryKey(t => t.Id) .Index(t => t.StatementBillNo, unique: true); CreateTable( "dbo.v_OrderStickBill", c => new { OrderStickBillNo = c.String(nullable: false, maxLength: 128), CustomerId = c.String(), CreatDate = c.DateTime(), StickNum = c.String(), StickMan = c.String(), Description = c.String(), TimeCreated = c.DateTime(), CustomerName = c.String(), Address = c.String(), LinkMan = c.String(), TotalPrice = c.Decimal(precision: 18, scale: 3), AfterTaxTotalPrice = c.Decimal(precision: 18, scale: 3), CurrencyId = c.String(), InvoiceState = c.Int(), Amount = c.Decimal(precision: 18, scale: 2), OriginalStickNum = c.String(), ReturnOrderNo = c.String(), OrderNo = c.String(), InvoiceType = c.Int(nullable: false), }) .PrimaryKey(t => t.OrderStickBillNo); } public override void Down() { DropForeignKey("dbo.Sys_States", "LastModifierUserId", "dbo.Sys_Users"); DropForeignKey("dbo.Sys_States", "DeleterUserId", "dbo.Sys_Users"); DropForeignKey("dbo.Sys_States", "CreatorUserId", "dbo.Sys_Users"); DropForeignKey("dbo.Sys_Settings", "LastModifierUserId", "dbo.Sys_Users"); DropForeignKey("dbo.Sys_Settings", "DeleterUserId", "dbo.Sys_Users"); DropForeignKey("dbo.Sys_Settings", "CreatorUserId", "dbo.Sys_Users"); DropForeignKey("dbo.ScrapTypeInfo", "LastModifierUserId", "dbo.Sys_Users"); DropForeignKey("dbo.ScrapTypeInfo", "DeleterUserId", "dbo.Sys_Users"); DropForeignKey("dbo.ScrapTypeInfo", "CreatorUserId", "dbo.Sys_Users"); DropForeignKey("dbo.Sys_Roles", "LastModifierUserId", "dbo.Sys_Users"); DropForeignKey("dbo.Sys_Roles", "DeleterUserId", "dbo.Sys_Users"); DropForeignKey("dbo.Sys_Roles", "CreatorUserId", "dbo.Sys_Users"); DropForeignKey("dbo.QualityIssueLabelInfo", "LastModifierUserId", "dbo.Sys_Users"); DropForeignKey("dbo.QualityIssueLabelInfo", "DeleterUserId", "dbo.Sys_Users"); DropForeignKey("dbo.QualityIssueLabelInfo", "CreatorUserId", "dbo.Sys_Users"); DropForeignKey("dbo.ProductionOrderLogInfo", "EmployeeId", "dbo.EmployeeInfo"); DropForeignKey("dbo.ProductionOrderLogInfo", "CreatorUserId", "dbo.Sys_Users"); DropForeignKey("dbo.MoldProductionRecord", "LastModifierUserId", "dbo.Sys_Users"); DropForeignKey("dbo.MoldProductionRecord", "CreatorUserId", "dbo.Sys_Users"); DropForeignKey("dbo.MoldInfo", "LastModifierUserId", "dbo.Sys_Users"); DropForeignKey("dbo.MoldInfo", "DeleterUserId", "dbo.Sys_Users"); DropForeignKey("dbo.MoldInfo", "CreatorUserId", "dbo.Sys_Users"); DropForeignKey("dbo.MaintenanceRecordInfo", "CreatorUserId", "dbo.Sys_Users"); DropForeignKey("dbo.MaintenanceMemberInfo", "EmployeeId", "dbo.EmployeeInfo"); DropForeignKey("dbo.MaintenanceMemberInfo", "CreatorUserId", "dbo.Sys_Users"); DropForeignKey("dbo.LicenseTypeInfo", "LastModifierUserId", "dbo.Sys_Users"); DropForeignKey("dbo.LicenseTypeInfo", "CreatorUserId", "dbo.Sys_Users"); DropForeignKey("dbo.LicenseDocumentInfo", "LastModifierUserId", "dbo.Sys_Users"); DropForeignKey("dbo.LicenseDocumentInfo", "DeleterUserId", "dbo.Sys_Users"); DropForeignKey("dbo.LicenseDocumentInfo", "CreatorUserId", "dbo.Sys_Users"); DropForeignKey("dbo.Sys_Functions", "LastModifierUserId", "dbo.Sys_Users"); DropForeignKey("dbo.Sys_Functions", "DeleterUserId", "dbo.Sys_Users"); DropForeignKey("dbo.Sys_Functions", "CreatorUserId", "dbo.Sys_Users"); DropForeignKey("dbo.FixedAssetTypeInfo", "LastModifierUserId", "dbo.Sys_Users"); DropForeignKey("dbo.FixedAssetTypeInfo", "DeleterUserId", "dbo.Sys_Users"); DropForeignKey("dbo.FixedAssetTypeInfo", "CreatorUserId", "dbo.Sys_Users"); DropForeignKey("dbo.FixedAssetInfo", "LastModifierUserId", "dbo.Sys_Users"); DropForeignKey("dbo.FixedAssetInfo", "DeleterUserId", "dbo.Sys_Users"); DropForeignKey("dbo.FixedAssetInfo", "CreatorUserId", "dbo.Sys_Users"); DropForeignKey("dbo.ExpressProviderMappers", "ProviderId", "dbo.ExpressServiceProviders"); DropForeignKey("dbo.ExpressProviderMappers", "ExpressId", "dbo.ExpressLogistics"); DropForeignKey("dbo.EmployeeWorkPerformanceInfo", "EmployeeId", "dbo.EmployeeInfo"); DropForeignKey("dbo.EmployeeWorkPerformanceInfo", "CreatorUserId", "dbo.Sys_Users"); DropForeignKey("dbo.EmployeeInfo", "LastModifierUserId", "dbo.Sys_Users"); DropForeignKey("dbo.EmployeeInfo", "DeleterUserId", "dbo.Sys_Users"); DropForeignKey("dbo.EmployeeInfo", "CreatorUserId", "dbo.Sys_Users"); DropForeignKey("dbo.DisqualifiedProductInfo", "CreatorUserId", "dbo.Sys_Users"); DropForeignKey("dbo.DeviceMgPlanInfo", "LastModifierUserId", "dbo.Sys_Users"); DropForeignKey("dbo.DeviceMgPlanInfo", "DeleterUserId", "dbo.Sys_Users"); DropForeignKey("dbo.DeviceMgPlanInfo", "CreatorUserId", "dbo.Sys_Users"); DropForeignKey("dbo.CustomerDisProductInfo", "CreatorUserId", "dbo.Sys_Users"); DropForeignKey("dbo.Sys_UserRoles", "UserId", "dbo.Sys_Users"); DropForeignKey("dbo.Sys_Users", "LastModifierUserId", "dbo.Sys_Users"); DropForeignKey("dbo.Sys_Users", "DeleterUserId", "dbo.Sys_Users"); DropForeignKey("dbo.Sys_Users", "CreatorUserId", "dbo.Sys_Users"); DropIndex("dbo.N_ViewStatementBill", new[] { "StatementBillNo" }); DropIndex("dbo.Sys_States", new[] { "CreatorUserId" }); DropIndex("dbo.Sys_States", new[] { "LastModifierUserId" }); DropIndex("dbo.Sys_States", new[] { "DeleterUserId" }); DropIndex("dbo.StatementBill", new[] { "StatementBillNo" }); DropIndex("dbo.Sys_Settings", new[] { "CreatorUserId" }); DropIndex("dbo.Sys_Settings", new[] { "LastModifierUserId" }); DropIndex("dbo.Sys_Settings", new[] { "DeleterUserId" }); DropIndex("dbo.ScrapTypeInfo", new[] { "CreatorUserId" }); DropIndex("dbo.ScrapTypeInfo", new[] { "LastModifierUserId" }); DropIndex("dbo.ScrapTypeInfo", new[] { "DeleterUserId" }); DropIndex("dbo.Sys_Roles", new[] { "CreatorUserId" }); DropIndex("dbo.Sys_Roles", new[] { "LastModifierUserId" }); DropIndex("dbo.Sys_Roles", new[] { "DeleterUserId" }); DropIndex("dbo.ReturnGoodOrder", new[] { "ReturnOrderNo" }); DropIndex("dbo.QualityIssueLabelInfo", new[] { "CreatorUserId" }); DropIndex("dbo.QualityIssueLabelInfo", new[] { "LastModifierUserId" }); DropIndex("dbo.QualityIssueLabelInfo", new[] { "DeleterUserId" }); DropIndex("dbo.ProductionOrderLogInfo", new[] { "CreatorUserId" }); DropIndex("dbo.ProductionOrderLogInfo", new[] { "EmployeeId" }); DropIndex("dbo.MoldProductionRecord", new[] { "CreatorUserId" }); DropIndex("dbo.MoldProductionRecord", new[] { "LastModifierUserId" }); DropIndex("dbo.MoldInfo", new[] { "CreatorUserId" }); DropIndex("dbo.MoldInfo", new[] { "LastModifierUserId" }); DropIndex("dbo.MoldInfo", new[] { "DeleterUserId" }); DropIndex("dbo.MaintenanceRecordInfo", new[] { "CreatorUserId" }); DropIndex("dbo.MaintenanceMemberInfo", new[] { "CreatorUserId" }); DropIndex("dbo.MaintenanceMemberInfo", new[] { "EmployeeId" }); DropIndex("dbo.LicenseTypeInfo", new[] { "CreatorUserId" }); DropIndex("dbo.LicenseTypeInfo", new[] { "LastModifierUserId" }); DropIndex("dbo.LicenseDocumentInfo", new[] { "CreatorUserId" }); DropIndex("dbo.LicenseDocumentInfo", new[] { "LastModifierUserId" }); DropIndex("dbo.LicenseDocumentInfo", new[] { "DeleterUserId" }); DropIndex("dbo.Sys_Functions", new[] { "CreatorUserId" }); DropIndex("dbo.Sys_Functions", new[] { "LastModifierUserId" }); DropIndex("dbo.Sys_Functions", new[] { "DeleterUserId" }); DropIndex("dbo.FixedAssetTypeInfo", new[] { "CreatorUserId" }); DropIndex("dbo.FixedAssetTypeInfo", new[] { "LastModifierUserId" }); DropIndex("dbo.FixedAssetTypeInfo", new[] { "DeleterUserId" }); DropIndex("dbo.FixedAssetInfo", new[] { "CreatorUserId" }); DropIndex("dbo.FixedAssetInfo", new[] { "LastModifierUserId" }); DropIndex("dbo.FixedAssetInfo", new[] { "DeleterUserId" }); DropIndex("dbo.ExpressProviderMappers", new[] { "ProviderId" }); DropIndex("dbo.ExpressProviderMappers", new[] { "ExpressId" }); DropIndex("dbo.EmployeeWorkPerformanceInfo", new[] { "CreatorUserId" }); DropIndex("dbo.EmployeeWorkPerformanceInfo", new[] { "EmployeeId" }); DropIndex("dbo.EmployeeInfo", new[] { "CreatorUserId" }); DropIndex("dbo.EmployeeInfo", new[] { "LastModifierUserId" }); DropIndex("dbo.EmployeeInfo", new[] { "DeleterUserId" }); DropIndex("dbo.DisqualifiedProductInfo", new[] { "CreatorUserId" }); DropIndex("dbo.DeviceMgPlanInfo", new[] { "CreatorUserId" }); DropIndex("dbo.DeviceMgPlanInfo", new[] { "LastModifierUserId" }); DropIndex("dbo.DeviceMgPlanInfo", new[] { "DeleterUserId" }); DropIndex("dbo.Sys_UserRoles", new[] { "UserId" }); DropIndex("dbo.Sys_Users", new[] { "CreatorUserId" }); DropIndex("dbo.Sys_Users", new[] { "LastModifierUserId" }); DropIndex("dbo.Sys_Users", new[] { "DeleterUserId" }); DropIndex("dbo.CustomerDisProductInfo", new[] { "CreatorUserId" }); DropTable("dbo.v_OrderStickBill"); DropTable("dbo.N_ViewStatementBill"); DropTable("dbo.N_ViewSemiOutStore"); DropTable("dbo.N_ViewSemiEnterStore"); DropTable("dbo.N_ViewScrapEnterStore", removedAnnotations: new Dictionary { { "DynamicFilter_ViewScrapEnterStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.N_ViewRmOutStore", removedAnnotations: new Dictionary { { "DynamicFilter_ViewRmOutStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.N_ViewRmEnterStore", removedAnnotations: new Dictionary { { "DynamicFilter_ViewRmEnterStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.v_QueryCurrentProductNum"); DropTable("dbo.N_ViewProductOutStore"); DropTable("dbo.N_ViewProductEnterStore"); DropTable("dbo.N_ViewPackageApply"); DropTable("dbo.vwOrderSendBill"); DropTable("dbo.N_ViewOrderSends"); DropTable("dbo.v_OrderSendBill"); DropTable("dbo.N_ViewOrderItems"); DropTable("dbo.N_ViewInventoryCheckRecord_Semi"); DropTable("dbo.N_ViewInventoryCheckRecord_Product"); DropTable("dbo.v_EnterOutSemiProductStore"); DropTable("dbo.v_Store_Query"); DropTable("dbo.vEnterOutLogDetail_c"); DropTable("dbo.NV_ViewEmployeeInfo"); DropTable("dbo.N_ViewDisqualifiedReturn"); DropTable("dbo.N_ViewDisqualifiedProduction"); DropTable("dbo.v_customerstick"); DropTable("dbo.v_ProductStoreInfo"); DropTable("dbo.v_SemiProductStoreInfo"); DropTable("dbo.N_ViewCurrentSemiStoreHouse"); DropTable("dbo.N_ViewCurrentRmStoreHouse", removedAnnotations: new Dictionary { { "DynamicFilter_ViewCurrentRmStoreHouse_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.N_ViewCurrentProductStoreHouse"); DropTable("dbo.v_CanProductStore"); DropTable("dbo.v_BookedProductNum"); DropTable("dbo.Sys_UserLogins"); DropTable("dbo.Sys_UserLoginLogs"); DropTable("dbo.TemplateInfos"); DropTable("dbo.Sys_States", removedAnnotations: new Dictionary { { "DynamicFilter_SysState_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.Sys_Helps"); DropTable("dbo.Sys_AttachFiles"); DropTable("dbo.StoreHouse"); DropTable("dbo.StoreHouseLocation", removedAnnotations: new Dictionary { { "DynamicFilter_StoreHouseLocation_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.StatementBill"); DropTable("dbo.Standard"); DropTable("dbo.StandardDetail", removedAnnotations: new Dictionary { { "DynamicFilter_StandardDetail_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.StandardCatalog", removedAnnotations: new Dictionary { { "DynamicFilter_StandardCatalog_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.ShortMsgDetail"); DropTable("dbo.ShortMessage"); DropTable("dbo.Sys_Settings", removedAnnotations: new Dictionary { { "DynamicFilter_SysSetting_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.SemiProductStore"); DropTable("dbo.SemiProducts"); DropTable("dbo.SemiOutStores"); DropTable("dbo.SemiEnterStore"); DropTable("dbo.ScrapTypeInfo", removedAnnotations: new Dictionary { { "DynamicFilter_ScrapType_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.ScrapEnterStore", removedAnnotations: new Dictionary { { "DynamicFilter_ScrapEnterStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.N_ViewScheduleOrderSend"); DropTable("dbo.ScheduleOrderSend"); DropTable("dbo.Sys_Roles", removedAnnotations: new Dictionary { { "DynamicFilter_SysRole_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.RmProduct", removedAnnotations: new Dictionary { { "DynamicFilter_RmProduct_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.RmOutStore", removedAnnotations: new Dictionary { { "DynamicFilter_RmOutStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.RmEnterStore", removedAnnotations: new Dictionary { { "DynamicFilter_RmEnterStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.ReturnGoodOrder", removedAnnotations: new Dictionary { { "DynamicFilter_ReturnGoodOrder_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.Regions"); DropTable("dbo.QualityIssueLabelInfo", removedAnnotations: new Dictionary { { "DynamicFilter_QualityIssueLabel_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.ProductInspectReportContents"); DropTable("dbo.Products"); DropTable("dbo.ProductProperties", removedAnnotations: new Dictionary { { "DynamicFilter_ProductProperty_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.ProductOutStore"); DropTable("dbo.ProductMapper", removedAnnotations: new Dictionary { { "DynamicFilter_ProductMapper_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.ProductionOrders"); DropTable("dbo.ProductionOrderLogInfo"); DropTable("dbo.ProductInspectReportInfos"); DropTable("dbo.ProductInspectInfos"); DropTable("dbo.Sys_Permissions"); DropTable("dbo.PackageApply"); DropTable("dbo.OutFactory"); DropTable("dbo.OrderUnit"); DropTable("dbo.OrderStickBills"); DropTable("dbo.OrderSend"); DropTable("dbo.OrderSendExceed"); DropTable("dbo.OrderSendBills"); DropTable("dbo.OrderProduction"); DropTable("dbo.OrderItems"); DropTable("dbo.OrderHeader"); DropTable("dbo.MoldProductionRecord"); DropTable("dbo.MoldInfo", removedAnnotations: new Dictionary { { "DynamicFilter_Mold_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.MaintenanceRecordInfo"); DropTable("dbo.MaintenanceMemberInfo"); DropTable("dbo.LicenseTypeInfo"); DropTable("dbo.LicenseDocumentInfo", removedAnnotations: new Dictionary { { "DynamicFilter_LicenseDocument_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.InventoryCheckRecord"); DropTable("dbo.InventoryCheck", removedAnnotations: new Dictionary { { "DynamicFilter_InventoryCheckInfo_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.Sys_Functions", removedAnnotations: new Dictionary { { "DynamicFilter_SysFunction_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.FixedAssetTypeInfo", removedAnnotations: new Dictionary { { "DynamicFilter_FixedAssetType_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.FixedAssetInfo", removedAnnotations: new Dictionary { { "DynamicFilter_FixedAsset_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.FinshedEnterStore"); DropTable("dbo.Factories"); DropTable("dbo.ExpressServiceProviders"); DropTable("dbo.ExpressProviderMappers"); DropTable("dbo.ExpressLogistics"); DropTable("dbo.EmployeeWorkPerformanceInfo"); DropTable("dbo.EmployeeInfo", removedAnnotations: new Dictionary { { "DynamicFilter_Employee_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.Dutys"); DropTable("dbo.DisqualifiedProductInfo"); DropTable("dbo.DeviceMgPlanInfo", removedAnnotations: new Dictionary { { "DynamicFilter_DeviceMgPlan_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.Departments"); DropTable("dbo.CustomerSend"); DropTable("dbo.Customers"); DropTable("dbo.CustomerInvoiceAddress", removedAnnotations: new Dictionary { { "DynamicFilter_CustomerInvoiceAddress_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.Sys_UserRoles"); DropTable("dbo.Sys_Users", removedAnnotations: new Dictionary { { "DynamicFilter_SysUser_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.CustomerDisProductInfo"); DropTable("dbo.CustomerDefaultProduct"); DropTable("dbo.CurrentSemiStoreHouse"); DropTable("dbo.CurrentRmStoreHouse", removedAnnotations: new Dictionary { { "DynamicFilter_CurrentRmStoreHouse_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.CurrentProductStoreHouse"); DropTable("dbo.CurrencyExchangeRate"); DropTable("dbo.Currency"); DropTable("dbo.BusinessLogs", removedAnnotations: new Dictionary { { "DynamicFilter_BusinessLog_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" }, }); DropTable("dbo.BulletinInfo"); DropTable("dbo.BackUpCurrentSemiStoreHouse"); DropTable("dbo.Sys_AuditLogs"); DropTable("dbo.Sys_AppGuids"); } } }