202501200142576_add-wxuser-table.cs 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 addwxusertable : DbMigration
  8. {
  9. public override void Up()
  10. {
  11. CreateTable(
  12. "dbo.WxUsers",
  13. c => new
  14. {
  15. Id = c.Int(nullable: false, identity: true),
  16. UserId = c.Long(nullable: false),
  17. UserName = c.String(),
  18. OpenId = c.String(),
  19. RealName = c.String(),
  20. AvatarUrl = c.String(),
  21. Gender = c.String(),
  22. Country = c.String(),
  23. Province = c.String(),
  24. City = c.String(),
  25. Language = c.String(),
  26. NickName = c.String(),
  27. UnionId = c.String(),
  28. Remark = c.String(),
  29. IsDeleted = c.Boolean(nullable: false),
  30. DeleterUserId = c.Long(),
  31. DeletionTime = c.DateTime(),
  32. LastModificationTime = c.DateTime(),
  33. LastModifierUserId = c.Long(),
  34. CreationTime = c.DateTime(nullable: false),
  35. CreatorUserId = c.Long(),
  36. },
  37. annotations: new Dictionary<string, object>
  38. {
  39. { "DynamicFilter_WxUser_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  40. })
  41. .PrimaryKey(t => t.Id);
  42. }
  43. public override void Down()
  44. {
  45. DropTable("dbo.WxUsers",
  46. removedAnnotations: new Dictionary<string, object>
  47. {
  48. { "DynamicFilter_WxUser_SoftDelete", "EntityFramework.DynamicFilters.DynamicFilterDefinition" },
  49. });
  50. }
  51. }
  52. }