From 1717a42031fa0575d00dd2432a61046d8cdd93d2 Mon Sep 17 00:00:00 2001
From: FrankH <4848285@qq.com>
Date: Tue, 25 Mar 2025 15:07:42 +0800
Subject: [PATCH 1/9] Rollback db to V1
---
.../Migrations/20250323190719_V2.Designer.cs | 548 ------------------
src/MvcDemo/Migrations/20250323190719_V2.cs | 254 --------
.../Migrations/DemoDbContextModelSnapshot.cs | 338 ++++++-----
3 files changed, 202 insertions(+), 938 deletions(-)
delete mode 100644 src/MvcDemo/Migrations/20250323190719_V2.Designer.cs
delete mode 100644 src/MvcDemo/Migrations/20250323190719_V2.cs
diff --git a/src/MvcDemo/Migrations/20250323190719_V2.Designer.cs b/src/MvcDemo/Migrations/20250323190719_V2.Designer.cs
deleted file mode 100644
index d342b94..0000000
--- a/src/MvcDemo/Migrations/20250323190719_V2.Designer.cs
+++ /dev/null
@@ -1,548 +0,0 @@
-//
-using System;
-using Demo.Data;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-#nullable disable
-
-namespace Demo.Migrations
-{
- [DbContext(typeof(DemoDbContext))]
- [Migration("20250323190719_V2")]
- partial class V2
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder.HasAnnotation("ProductVersion", "8.0.14");
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
- {
- b.Property("Id")
- .HasColumnType("TEXT");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasColumnType("TEXT");
-
- b.Property("Name")
- .HasMaxLength(256)
- .HasColumnType("TEXT");
-
- b.Property("NormalizedName")
- .HasMaxLength(256)
- .HasColumnType("TEXT");
-
- b.HasKey("Id");
-
- b.HasIndex("NormalizedName")
- .IsUnique()
- .HasDatabaseName("RoleNameIndex");
-
- b.ToTable("AspNetRoles", (string)null);
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("ClaimType")
- .HasColumnType("TEXT");
-
- b.Property("ClaimValue")
- .HasColumnType("TEXT");
-
- b.Property("RoleId")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.HasKey("Id");
-
- b.HasIndex("RoleId");
-
- b.ToTable("AspNetRoleClaims", (string)null);
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUser", b =>
- {
- b.Property("Id")
- .HasColumnType("TEXT");
-
- b.Property("AccessFailedCount")
- .HasColumnType("INTEGER");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasColumnType("TEXT");
-
- b.Property("Email")
- .HasMaxLength(256)
- .HasColumnType("TEXT");
-
- b.Property("EmailConfirmed")
- .HasColumnType("INTEGER");
-
- b.Property("LockoutEnabled")
- .HasColumnType("INTEGER");
-
- b.Property("LockoutEnd")
- .HasColumnType("TEXT");
-
- b.Property("NormalizedEmail")
- .HasMaxLength(256)
- .HasColumnType("TEXT");
-
- b.Property("NormalizedUserName")
- .HasMaxLength(256)
- .HasColumnType("TEXT");
-
- b.Property("PasswordHash")
- .HasColumnType("TEXT");
-
- b.Property("PhoneNumber")
- .HasColumnType("TEXT");
-
- b.Property("PhoneNumberConfirmed")
- .HasColumnType("INTEGER");
-
- b.Property("SecurityStamp")
- .HasColumnType("TEXT");
-
- b.Property("TwoFactorEnabled")
- .HasColumnType("INTEGER");
-
- b.Property("UserName")
- .HasMaxLength(256)
- .HasColumnType("TEXT");
-
- b.HasKey("Id");
-
- b.HasIndex("NormalizedEmail")
- .HasDatabaseName("EmailIndex");
-
- b.HasIndex("NormalizedUserName")
- .IsUnique()
- .HasDatabaseName("UserNameIndex");
-
- b.ToTable("AspNetUsers", (string)null);
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("INTEGER");
-
- b.Property("ClaimType")
- .HasColumnType("TEXT");
-
- b.Property("ClaimValue")
- .HasColumnType("TEXT");
-
- b.Property("UserId")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.HasKey("Id");
-
- b.HasIndex("UserId");
-
- b.ToTable("AspNetUserClaims", (string)null);
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
- {
- b.Property("LoginProvider")
- .HasColumnType("TEXT");
-
- b.Property("ProviderKey")
- .HasColumnType("TEXT");
-
- b.Property("ProviderDisplayName")
- .HasColumnType("TEXT");
-
- b.Property("UserId")
- .IsRequired()
- .HasColumnType("TEXT");
-
- b.HasKey("LoginProvider", "ProviderKey");
-
- b.HasIndex("UserId");
-
- b.ToTable("AspNetUserLogins", (string)null);
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
- {
- b.Property("UserId")
- .HasColumnType("TEXT");
-
- b.Property("RoleId")
- .HasColumnType("TEXT");
-
- b.HasKey("UserId", "RoleId");
-
- b.HasIndex("RoleId");
-
- b.ToTable("AspNetUserRoles", (string)null);
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
- {
- b.Property("UserId")
- .HasColumnType("TEXT");
-
- b.Property("LoginProvider")
- .HasColumnType("TEXT");
-
- b.Property("Name")
- .HasColumnType("TEXT");
-
- b.Property("Value")
- .HasColumnType("TEXT");
-
- b.HasKey("UserId", "LoginProvider", "Name");
-
- b.ToTable("AspNetUserTokens", (string)null);
- });
-
- modelBuilder.Entity("Myvas.AspNetCore.Weixin.WeixinReceivedEventEntity", b =>
- {
- b.Property("Id")
- .HasColumnType("TEXT");
-
- b.Property("ConcurrencyStamp")
- .HasColumnType("TEXT");
-
- b.Property("CreateTime")
- .HasColumnType("INTEGER");
-
- b.Property("Event")
- .HasColumnType("TEXT");
-
- b.Property("EventKey")
- .HasColumnType("TEXT");
-
- b.Property("FromUserName")
- .HasColumnType("TEXT");
-
- b.Property("Latitude")
- .HasColumnType("TEXT");
-
- b.Property("Longitude")
- .HasColumnType("TEXT");
-
- b.Property("MsgType")
- .HasColumnType("TEXT");
-
- b.Property("Precision")
- .HasColumnType("TEXT");
-
- b.Property("Ticket")
- .HasColumnType("TEXT");
-
- b.Property("ToUserName")
- .HasColumnType("TEXT");
-
- b.HasKey("Id");
-
- b.ToTable("WeixinReceivedEvents");
- });
-
- modelBuilder.Entity("Myvas.AspNetCore.Weixin.WeixinReceivedMessageEntity", b =>
- {
- b.Property("Id")
- .HasColumnType("TEXT");
-
- b.Property("ConcurrencyStamp")
- .HasColumnType("TEXT");
-
- b.Property("Content")
- .HasColumnType("TEXT");
-
- b.Property("CreateTime")
- .HasColumnType("INTEGER");
-
- b.Property("Description")
- .HasColumnType("TEXT");
-
- b.Property("Format")
- .HasColumnType("TEXT");
-
- b.Property("FromUserName")
- .HasColumnType("TEXT");
-
- b.Property("Label")
- .HasColumnType("TEXT");
-
- b.Property("Latitude")
- .HasColumnType("TEXT");
-
- b.Property("Longitude")
- .HasColumnType("TEXT");
-
- b.Property("MediaId")
- .HasColumnType("TEXT");
-
- b.Property("MsgId")
- .HasColumnType("INTEGER");
-
- b.Property("MsgType")
- .HasColumnType("TEXT");
-
- b.Property("PicUrl")
- .HasColumnType("TEXT");
-
- b.Property("Recognition")
- .HasColumnType("TEXT");
-
- b.Property("Scale")
- .HasColumnType("TEXT");
-
- b.Property("ThumbMediaId")
- .HasColumnType("TEXT");
-
- b.Property("Title")
- .HasColumnType("TEXT");
-
- b.Property("ToUserName")
- .HasColumnType("TEXT");
-
- b.Property("Url")
- .HasColumnType("TEXT");
-
- b.HasKey("Id");
-
- b.ToTable("WeixinReceivedMessages");
- });
-
- modelBuilder.Entity("Myvas.AspNetCore.Weixin.WeixinResponseMessageEntity", b =>
- {
- b.Property("Id")
- .HasColumnType("TEXT");
-
- b.Property("ConcurrencyStamp")
- .HasColumnType("TEXT");
-
- b.Property("Content")
- .HasColumnType("TEXT");
-
- b.Property("CreateTime")
- .HasColumnType("INTEGER");
-
- b.Property("Description")
- .HasColumnType("TEXT");
-
- b.Property("Format")
- .HasColumnType("TEXT");
-
- b.Property("FromUserName")
- .HasColumnType("TEXT");
-
- b.Property("Label")
- .HasColumnType("TEXT");
-
- b.Property("Latitude")
- .HasColumnType("TEXT");
-
- b.Property("Longitude")
- .HasColumnType("TEXT");
-
- b.Property("MediaId")
- .HasColumnType("TEXT");
-
- b.Property("MsgId")
- .HasColumnType("TEXT");
-
- b.Property("MsgType")
- .HasColumnType("TEXT");
-
- b.Property("PicUrl")
- .HasColumnType("TEXT");
-
- b.Property("RequestId")
- .HasColumnType("TEXT");
-
- b.Property("Scale")
- .HasColumnType("TEXT");
-
- b.Property("ThumbMediaId")
- .HasColumnType("TEXT");
-
- b.Property("Title")
- .HasColumnType("TEXT");
-
- b.Property("ToUserName")
- .HasColumnType("TEXT");
-
- b.Property("Url")
- .HasColumnType("TEXT");
-
- b.HasKey("Id");
-
- b.ToTable("WeixinResponseMessages");
- });
-
- modelBuilder.Entity("Myvas.AspNetCore.Weixin.WeixinSendMessageEntity", b =>
- {
- b.Property("Id")
- .HasColumnType("TEXT");
-
- b.Property("ConcurrencyStamp")
- .HasColumnType("TEXT");
-
- b.Property("Content")
- .HasColumnType("TEXT");
-
- b.Property("CreateTime")
- .HasColumnType("INTEGER");
-
- b.Property("FromUserName")
- .HasColumnType("TEXT");
-
- b.Property("LastRetCode")
- .HasColumnType("INTEGER");
-
- b.Property("LastRetMsg")
- .HasColumnType("TEXT");
-
- b.Property("LastTried")
- .HasColumnType("TEXT");
-
- b.Property("RetryTimes")
- .HasColumnType("INTEGER");
-
- b.Property("ScheduleTime")
- .HasColumnType("TEXT");
-
- b.Property("ToUserName")
- .HasColumnType("TEXT");
-
- b.HasKey("Id");
-
- b.ToTable("WeixinSendMessages");
- });
-
- modelBuilder.Entity("Myvas.AspNetCore.Weixin.WeixinSubscriberEntity", b =>
- {
- b.Property("Id")
- .HasColumnType("TEXT");
-
- b.Property("City")
- .HasColumnType("TEXT");
-
- b.Property("ConcurrencyStamp")
- .HasColumnType("TEXT");
-
- b.Property("Country")
- .HasColumnType("TEXT");
-
- b.Property("HeadImgUrl")
- .HasColumnType("TEXT");
-
- b.Property("Language")
- .HasColumnType("TEXT");
-
- b.Property("MentorId")
- .HasColumnType("TEXT");
-
- b.Property("Nickname")
- .HasColumnType("TEXT");
-
- b.Property("OpenId")
- .HasMaxLength(32)
- .HasColumnType("TEXT");
-
- b.Property("Province")
- .HasColumnType("TEXT");
-
- b.Property("Remark")
- .HasColumnType("TEXT");
-
- b.Property("SecurityStamp")
- .HasColumnType("TEXT");
-
- b.Property("Sex")
- .HasColumnType("INTEGER");
-
- b.Property("SubscribeTime")
- .HasColumnType("INTEGER");
-
- b.Property("Subscribed")
- .HasColumnType("INTEGER");
-
- b.Property("UnionId")
- .HasMaxLength(32)
- .HasColumnType("TEXT");
-
- b.Property("UnsubscribeTime")
- .HasColumnType("INTEGER");
-
- b.Property("UserId")
- .HasColumnType("TEXT");
-
- b.HasKey("Id");
-
- b.ToTable("WeixinSubscribers");
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim", b =>
- {
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
- .WithMany()
- .HasForeignKey("RoleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim", b =>
- {
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin", b =>
- {
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole", b =>
- {
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
- .WithMany()
- .HasForeignKey("RoleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken", b =>
- {
- b.HasOne("Microsoft.AspNetCore.Identity.IdentityUser", null)
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/src/MvcDemo/Migrations/20250323190719_V2.cs b/src/MvcDemo/Migrations/20250323190719_V2.cs
deleted file mode 100644
index ee8e147..0000000
--- a/src/MvcDemo/Migrations/20250323190719_V2.cs
+++ /dev/null
@@ -1,254 +0,0 @@
-using System;
-using Microsoft.EntityFrameworkCore.Migrations;
-
-#nullable disable
-
-namespace Demo.Migrations
-{
- ///
- public partial class V2 : Migration
- {
- ///
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "AuditEntires");
-
- migrationBuilder.DropPrimaryKey(
- name: "PK_WeixinSubscribers",
- table: "WeixinSubscribers");
-
- migrationBuilder.DropColumn(
- name: "AppId",
- table: "WeixinSubscribers");
-
- migrationBuilder.DropColumn(
- name: "CreateUnixTime",
- table: "WeixinSubscribers");
-
- migrationBuilder.DropColumn(
- name: "RowVersion",
- table: "WeixinSubscribers");
-
- migrationBuilder.RenameColumn(
- name: "Gender",
- table: "WeixinSubscribers",
- newName: "Sex");
-
- migrationBuilder.RenameColumn(
- name: "NickName",
- table: "WeixinSubscribers",
- newName: "Nickname");
-
- migrationBuilder.RenameColumn(
- name: "AvatorImageUrl",
- table: "WeixinSubscribers",
- newName: "HeadImgUrl");
-
- migrationBuilder.RenameColumn(
- name: "SubscribedTime",
- table: "WeixinSubscribers",
- newName: "SubscribeTime");
-
- migrationBuilder.RenameColumn(
- name: "Unsubscribed",
- table: "WeixinSubscribers",
- newName: "Subscribed");
-
- migrationBuilder.RenameColumn(
- name: "UnsubscribedTime",
- table: "WeixinSubscribers",
- newName: "UnsubscribeTime");
-
- migrationBuilder.AddColumn(
- name: "Id",
- table: "WeixinSubscribers",
- type: "TEXT",
- nullable: false,
- defaultValue: "");
-
- migrationBuilder.AddColumn(
- name: "SecurityStamp",
- table: "WeixinSubscribers",
- type: "TEXT",
- nullable: true);
-
- migrationBuilder.AddColumn(
- name: "ConcurrencyStamp",
- table: "WeixinSubscribers",
- type: "TEXT",
- nullable: true);
-
- migrationBuilder.AddColumn(
- name: "CreateTime",
- table: "WeixinReceivedMessages",
- type: "INTEGER",
- nullable: true);
-
- migrationBuilder.AddColumn(
- name: "ConcurrencyStamp",
- table: "WeixinReceivedMessages",
- type: "TEXT",
- nullable: true);
-
- migrationBuilder.AddColumn(
- name: "CreateTime",
- table: "WeixinReceivedEvents",
- type: "INTEGER",
- nullable: true);
-
- migrationBuilder.AddColumn(
- name: "ConcurrencyStamp",
- table: "WeixinReceivedEvents",
- type: "TEXT",
- nullable: true);
-
- migrationBuilder.AddPrimaryKey(
- name: "PK_WeixinSubscribers",
- table: "WeixinSubscribers",
- column: "Id");
-
- migrationBuilder.CreateTable(
- name: "WeixinResponseMessages",
- columns: table => new
- {
- Id = table.Column(type: "TEXT", nullable: false),
- FromUserName = table.Column(type: "TEXT", nullable: true),
- ToUserName = table.Column(type: "TEXT", nullable: true),
- CreateTime = table.Column(type: "INTEGER", nullable: true),
- MsgType = table.Column(type: "TEXT", nullable: true),
- MsgId = table.Column(type: "TEXT", nullable: true),
- Content = table.Column(type: "TEXT", nullable: true),
- PicUrl = table.Column(type: "TEXT", nullable: true),
- MediaId = table.Column(type: "TEXT", nullable: true),
- Format = table.Column(type: "TEXT", nullable: true),
- ThumbMediaId = table.Column(type: "TEXT", nullable: true),
- Longitude = table.Column(type: "TEXT", nullable: false),
- Latitude = table.Column(type: "TEXT", nullable: false),
- Scale = table.Column(type: "TEXT", nullable: false),
- Label = table.Column(type: "TEXT", nullable: true),
- Title = table.Column(type: "TEXT", nullable: true),
- Url = table.Column(type: "TEXT", nullable: true),
- Description = table.Column(type: "TEXT", nullable: true),
- RequestId = table.Column(type: "TEXT", nullable: true),
- ConcurrencyStamp = table.Column(type: "TEXT", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_WeixinResponseMessages", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "WeixinSendMessages",
- columns: table => new
- {
- Id = table.Column(type: "TEXT", nullable: false),
- FromUserName = table.Column(type: "TEXT", nullable: true),
- ToUserName = table.Column(type: "TEXT", nullable: true),
- CreateTime = table.Column(type: "INTEGER", nullable: true),
- Content = table.Column(type: "TEXT", nullable: true),
- ScheduleTime = table.Column(type: "TEXT", nullable: true),
- LastRetCode = table.Column(type: "INTEGER", nullable: true),
- LastRetMsg = table.Column(type: "TEXT", nullable: true),
- RetryTimes = table.Column(type: "INTEGER", nullable: false),
- LastTried = table.Column(type: "TEXT", nullable: true),
- ConcurrencyStamp = table.Column(type: "TEXT", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_WeixinSendMessages", x => x.Id);
- });
- }
-
- ///
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "WeixinResponseMessages");
-
- migrationBuilder.DropTable(
- name: "WeixinSendMessages");
-
- migrationBuilder.DropPrimaryKey(
- name: "PK_WeixinSubscribers",
- table: "WeixinSubscribers");
-
- migrationBuilder.RenameColumn(
- name: "Sex",
- table: "WeixinSubscribers",
- newName: "Gender");
-
- migrationBuilder.RenameColumn(
- name: "SubscribeTime",
- table: "WeixinSubscribers",
- newName: "SubscribedTime");
-
- migrationBuilder.RenameColumn(
- name: "UnsubscribeTime",
- table: "WeixinSubscribers",
- newName: "UnsubscribedTime");
-
- migrationBuilder.RenameColumn(
- name: "Subscribed",
- table: "WeixinSubscribers",
- newName: "Unsubscribed");
-
- migrationBuilder.DropColumn(
- name: "SecurityStamp",
- table: "WeixinSubscribers");
-
- migrationBuilder.RenameColumn(
- name: "HeadImgUrl",
- table: "WeixinSubscribers",
- newName: "AvatorImageUrl");
-
- migrationBuilder.AddColumn(
- name: "AppId",
- table: "WeixinSubscribers",
- type: "TEXT",
- nullable: true);
-
- migrationBuilder.AddColumn(
- name: "RowVersion",
- table: "WeixinSubscribers",
- type: "BLOB",
- rowVersion: true,
- nullable: true);
-
- migrationBuilder.AddColumn(
- name: "CreateUnixTime",
- table: "WeixinReceivedMessages",
- type: "INTEGER",
- nullable: false,
- defaultValue: 0L);
-
- migrationBuilder.AddColumn(
- name: "CreateUnixTime",
- table: "WeixinReceivedEvents",
- type: "INTEGER",
- nullable: false,
- defaultValue: 0L);
-
- migrationBuilder.AddPrimaryKey(
- name: "PK_WeixinSubscribers",
- table: "WeixinSubscribers",
- column: "OpenId");
-
- migrationBuilder.CreateTable(
- name: "AuditEntires",
- columns: table => new
- {
- Id = table.Column(type: "TEXT", nullable: false),
- CreatedTime = table.Column(type: "TEXT", nullable: false),
- KeyValue = table.Column(type: "TEXT", nullable: true),
- NewValue = table.Column(type: "TEXT", nullable: true),
- OldValue = table.Column(type: "TEXT", nullable: true),
- TableName = table.Column(type: "TEXT", nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AuditEntires", x => x.Id);
- });
- }
- }
-}
diff --git a/src/MvcDemo/Migrations/DemoDbContextModelSnapshot.cs b/src/MvcDemo/Migrations/DemoDbContextModelSnapshot.cs
index d6d36bf..30bcce9 100644
--- a/src/MvcDemo/Migrations/DemoDbContextModelSnapshot.cs
+++ b/src/MvcDemo/Migrations/DemoDbContextModelSnapshot.cs
@@ -15,7 +15,7 @@ partial class DemoDbContextModelSnapshot : ModelSnapshot
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
- modelBuilder.HasAnnotation("ProductVersion", "8.0.14");
+ modelBuilder.HasAnnotation("ProductVersion", "6.0.3");
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{
@@ -209,141 +209,174 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.ToTable("AspNetUserTokens", (string)null);
});
- modelBuilder.Entity("Myvas.AspNetCore.Weixin.WeixinReceivedEventEntity", b =>
+ modelBuilder.Entity("Myvas.AspNetCore.Weixin.Models.AuditEntry", b =>
{
b.Property("Id")
.HasColumnType("TEXT");
- b.Property("ConcurrencyStamp")
+ b.Property("CreatedTime")
.HasColumnType("TEXT");
- b.Property("CreateTime")
- .HasColumnType("INTEGER");
-
- b.Property("Event")
+ b.Property("KeyValue")
.HasColumnType("TEXT");
- b.Property("EventKey")
+ b.Property("NewValue")
.HasColumnType("TEXT");
- b.Property("FromUserName")
+ b.Property("OldValue")
.HasColumnType("TEXT");
- b.Property("Latitude")
+ b.Property("TableName")
.HasColumnType("TEXT");
- b.Property("Longitude")
+ b.HasKey("Id");
+
+ b.ToTable("AuditEntires", (string)null);
+ });
+
+ modelBuilder.Entity("Myvas.AspNetCore.Weixin.Models.EventReceivedEntry", b =>
+ {
+ b.Property("Id")
.HasColumnType("TEXT");
- b.Property("MsgType")
+ b.Property("CreateUnixTime")
+ .HasColumnType("INTEGER");
+
+ b.Property("Event")
+ .IsRequired()
.HasColumnType("TEXT");
- b.Property("Precision")
+ b.Property("FromUserName")
+ .IsRequired()
+ .HasMaxLength(32)
.HasColumnType("TEXT");
- b.Property("Ticket")
+ b.Property("MsgType")
+ .IsRequired()
.HasColumnType("TEXT");
b.Property("ToUserName")
+ .IsRequired()
+ .HasMaxLength(32)
.HasColumnType("TEXT");
b.HasKey("Id");
- b.ToTable("WeixinReceivedEvents");
+ b.ToTable("WeixinReceivedEvents", (string)null);
+
+ b.HasDiscriminator("Event").HasValue("EventReceivedEntry");
});
- modelBuilder.Entity("Myvas.AspNetCore.Weixin.WeixinReceivedMessageEntity", b =>
+ modelBuilder.Entity("Myvas.AspNetCore.Weixin.Models.MessageReceivedEntry", b =>
{
b.Property("Id")
.HasColumnType("TEXT");
- b.Property("ConcurrencyStamp")
- .HasColumnType("TEXT");
+ b.Property("CreateUnixTime")
+ .HasColumnType("INTEGER");
- b.Property("Content")
+ b.Property("FromUserName")
+ .IsRequired()
+ .HasMaxLength(32)
.HasColumnType("TEXT");
- b.Property("CreateTime")
+ b.Property("MsgId")
.HasColumnType("INTEGER");
- b.Property("Description")
+ b.Property("MsgType")
+ .IsRequired()
.HasColumnType("TEXT");
- b.Property("Format")
+ b.Property("ToUserName")
+ .IsRequired()
+ .HasMaxLength(32)
.HasColumnType("TEXT");
- b.Property("FromUserName")
+ b.HasKey("Id");
+
+ b.ToTable("WeixinReceivedMessages", (string)null);
+
+ b.HasDiscriminator("MsgType").HasValue("MessageReceivedEntry");
+ });
+
+ modelBuilder.Entity("Myvas.AspNetCore.Weixin.Models.Subscriber", b =>
+ {
+ b.Property("OpenId")
+ .HasMaxLength(32)
.HasColumnType("TEXT");
- b.Property("Label")
+ b.Property("AppId")
.HasColumnType("TEXT");
- b.Property("Latitude")
+ b.Property("AvatorImageUrl")
.HasColumnType("TEXT");
- b.Property("Longitude")
+ b.Property("City")
.HasColumnType("TEXT");
- b.Property("MediaId")
+ b.Property("Country")
.HasColumnType("TEXT");
- b.Property("MsgId")
+ b.Property("Gender")
.HasColumnType("INTEGER");
- b.Property("MsgType")
+ b.Property("Language")
.HasColumnType("TEXT");
- b.Property("PicUrl")
+ b.Property("MentorId")
.HasColumnType("TEXT");
- b.Property("Recognition")
+ b.Property("Nickname")
.HasColumnType("TEXT");
- b.Property("Scale")
+ b.Property("Province")
.HasColumnType("TEXT");
- b.Property("ThumbMediaId")
+ b.Property("Remark")
.HasColumnType("TEXT");
- b.Property("Title")
- .HasColumnType("TEXT");
+ b.Property("RowVersion")
+ .IsConcurrencyToken()
+ .ValueGeneratedOnAddOrUpdate()
+ .HasColumnType("BLOB");
- b.Property("ToUserName")
+ b.Property("SubscribedTime")
.HasColumnType("TEXT");
- b.Property("Url")
+ b.Property("UnionId")
+ .HasMaxLength(32)
.HasColumnType("TEXT");
- b.HasKey("Id");
-
- b.ToTable("WeixinReceivedMessages");
- });
+ b.Property("Unsubscribed")
+ .IsRequired()
+ .HasColumnType("INTEGER");
- modelBuilder.Entity("Myvas.AspNetCore.Weixin.WeixinResponseMessageEntity", b =>
- {
- b.Property("Id")
+ b.Property("UnsubscribedTime")
.HasColumnType("TEXT");
- b.Property("ConcurrencyStamp")
+ b.Property("UserId")
.HasColumnType("TEXT");
- b.Property("Content")
- .HasColumnType("TEXT");
+ b.HasKey("OpenId");
- b.Property("CreateTime")
- .HasColumnType("INTEGER");
+ b.ToTable("WeixinSubscribers", (string)null);
+ });
- b.Property("Description")
- .HasColumnType("TEXT");
+ modelBuilder.Entity("Myvas.AspNetCore.Weixin.Models.ClickMenuEventReceivedEntry", b =>
+ {
+ b.HasBaseType("Myvas.AspNetCore.Weixin.Models.EventReceivedEntry");
- b.Property("Format")
- .HasColumnType("TEXT");
+ b.Property("EventKey")
+ .ValueGeneratedOnUpdateSometimes()
+ .HasColumnType("TEXT")
+ .HasColumnName("EventKey");
- b.Property("FromUserName")
- .HasColumnType("TEXT");
+ b.HasDiscriminator().HasValue("CLICK");
+ });
- b.Property("Label")
- .HasColumnType("TEXT");
+ modelBuilder.Entity("Myvas.AspNetCore.Weixin.Models.LocationEventReceivedEntry", b =>
+ {
+ b.HasBaseType("Myvas.AspNetCore.Weixin.Models.EventReceivedEntry");
b.Property("Latitude")
.HasColumnType("TEXT");
@@ -351,142 +384,175 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Property("Longitude")
.HasColumnType("TEXT");
- b.Property("MediaId")
+ b.Property