202411110556217_addOrderBook.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. namespace ShwasherSys.Migrations
  2. {
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Data.Entity.Infrastructure.Annotations;
  6. using System.Data.Entity.Migrations;
  7. public partial class addOrderBook : DbMigration
  8. {
  9. public override void Up()
  10. {
  11. CreateTable(
  12. "dbo.OrderBookStore",
  13. c => new
  14. {
  15. Id = c.Long(nullable: false, identity: true),
  16. OrderItemId = c.Int(nullable: false),
  17. ProductNo = c.String(maxLength: 30),
  18. QuantityPerPack = c.Decimal(precision: 18, scale: 3),
  19. PackageCount = c.Decimal(precision: 18, scale: 3),
  20. ProductBatchNum = c.String(maxLength: 32),
  21. StoreLocationNo = c.String(maxLength: 32),
  22. CurrentProductStoreHouseNo = c.String(),
  23. Status = c.Int(),
  24. IsDeleted = c.Boolean(nullable: false),
  25. DeleterUserId = c.Long(),
  26. DeletionTime = c.DateTime(),
  27. LastModificationTime = c.DateTime(),
  28. LastModifierUserId = c.Long(),
  29. CreationTime = c.DateTime(nullable: false),
  30. CreatorUserId = c.Long(),
  31. },
  32. annotations: new Dictionary<string, object>
  33. {
  34. { "DynamicFilter_OrderBookStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  35. })
  36. .PrimaryKey(t => t.Id);
  37. }
  38. public override void Down()
  39. {
  40. DropTable("dbo.OrderBookStore",
  41. removedAnnotations: new Dictionary<string, object>
  42. {
  43. { "DynamicFilter_OrderBookStore_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  44. });
  45. }
  46. }
  47. }