更新了迁移

This commit is contained in:
luolangaga 2024-08-10 19:53:32 +08:00
parent 26b6308776
commit bc396e5029
6 changed files with 1014 additions and 18 deletions

View File

@ -19,7 +19,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build

View File

@ -90,7 +90,17 @@ namespace asg_form.Controllers
return Ok("Image file uploaded successfully.");
}
[Route("api/v1/admin/dbgu")]
[HttpPost]
public async Task<ActionResult<object>> dbgu()
{
using(TestDbContext db=new TestDbContext())
{
await db.Database.MigrateAsync();
}
return Ok("successfully.");
}
[Route("api/v1/admin/Privacy_Policy")]
[HttpPost]

View File

@ -0,0 +1,818 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using asg_form.Controllers;
#nullable disable
namespace asg_form.Migrations
{
[DbContext(typeof(IDBcontext))]
[Migration("20240810113800_stort")]
partial class stort
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "8.0.0")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<long>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("ClaimType")
.HasColumnType("nvarchar(max)");
b.Property<string>("ClaimValue")
.HasColumnType("nvarchar(max)");
b.Property<long>("RoleId")
.HasColumnType("bigint");
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AspNetRoleClaims", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<long>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("ClaimType")
.HasColumnType("nvarchar(max)");
b.Property<string>("ClaimValue")
.HasColumnType("nvarchar(max)");
b.Property<long>("UserId")
.HasColumnType("bigint");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("AspNetUserClaims", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<long>", b =>
{
b.Property<string>("LoginProvider")
.HasColumnType("nvarchar(450)");
b.Property<string>("ProviderKey")
.HasColumnType("nvarchar(450)");
b.Property<string>("ProviderDisplayName")
.HasColumnType("nvarchar(max)");
b.Property<long>("UserId")
.HasColumnType("bigint");
b.HasKey("LoginProvider", "ProviderKey");
b.HasIndex("UserId");
b.ToTable("AspNetUserLogins", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<long>", b =>
{
b.Property<long>("UserId")
.HasColumnType("bigint");
b.Property<long>("RoleId")
.HasColumnType("bigint");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId");
b.ToTable("AspNetUserRoles", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<long>", b =>
{
b.Property<long>("UserId")
.HasColumnType("bigint");
b.Property<string>("LoginProvider")
.HasColumnType("nvarchar(450)");
b.Property<string>("Name")
.HasColumnType("nvarchar(450)");
b.Property<string>("Value")
.HasColumnType("nvarchar(max)");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AspNetUserTokens", (string)null);
});
modelBuilder.Entity("asg_form.Controllers.Champion+T_Champion", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<int>("eventsId")
.HasColumnType("int");
b.Property<long>("formId")
.HasColumnType("bigint");
b.Property<string>("msg")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("eventsId");
b.HasIndex("formId");
b.ToTable("F_Champion", (string)null);
});
modelBuilder.Entity("asg_form.Controllers.Store.StoreDB", b =>
{
b.Property<long>("id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<long>("Price")
.HasColumnType("bigint");
b.Property<string>("Type")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("description")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("information")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("id");
b.ToTable("StoreDB");
});
modelBuilder.Entity("asg_form.Controllers.Store.StoreinfoDB", b =>
{
b.Property<long>("id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
b.Property<long>("Storeid")
.HasColumnType("bigint");
b.Property<long>("buyerid")
.HasColumnType("bigint");
b.Property<bool>("isVerification")
.HasColumnType("bit");
b.HasKey("id");
b.HasIndex("Storeid");
b.ToTable("F_Store", (string)null);
});
modelBuilder.Entity("asg_form.Controllers.T_Friend", b =>
{
b.Property<long>("id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
b.Property<string>("account")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("comMsg")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("comTime")
.HasColumnType("datetime2");
b.Property<string>("comType")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<int>("degree")
.HasColumnType("int");
b.Property<string>("headName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("headTel")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("orgName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("id");
b.ToTable("F_Friend", (string)null);
});
modelBuilder.Entity("asg_form.Controllers.T_news", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<string>("FormName")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Title")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("msg")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<DateTime?>("time")
.IsRequired()
.HasColumnType("datetime2");
b.HasKey("Id");
b.ToTable("F_news", (string)null);
});
modelBuilder.Entity("asg_form.Controllers.comform+com_form", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<string>("Com_Cocial_media")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Com_Email")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("Com_qq")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<int>("Status")
.HasColumnType("int");
b.Property<int>("UserId")
.HasColumnType("int");
b.Property<string>("idv_id")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("introduction")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.ToTable("F_ComForm", (string)null);
});
modelBuilder.Entity("asg_form.Controllers.form", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<int>("eventsId")
.HasColumnType("int");
b.Property<string>("logo_uri")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<int>("piaoshu")
.HasColumnType("int");
b.Property<string>("team_name")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("team_password")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("team_tel")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("time")
.HasColumnType("datetime2");
b.HasKey("Id");
b.HasIndex("eventsId");
b.ToTable("F_form", (string)null);
});
modelBuilder.Entity("asg_form.Controllers.role", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<string>("Common_Roles")
.HasColumnType("nvarchar(max)");
b.Property<string>("Game_Name")
.HasColumnType("nvarchar(max)");
b.Property<int?>("Historical_Ranks")
.HasColumnType("int");
b.Property<string>("Id_Card")
.HasColumnType("nvarchar(max)");
b.Property<string>("Id_Card_Name")
.HasColumnType("nvarchar(max)");
b.Property<string>("Phone_Number")
.HasColumnType("nvarchar(max)");
b.Property<long>("formId")
.HasColumnType("bigint");
b.Property<string>("role_id")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("role_lin")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("role_name")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("formId");
b.ToTable("F_role", (string)null);
});
modelBuilder.Entity("asg_form.Controllers.schedule+schedule_log", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<string>("chickteam")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<long>("teamid")
.HasColumnType("bigint");
b.Property<string>("userid")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<bool?>("win")
.HasColumnType("bit");
b.HasKey("Id");
b.HasIndex("teamid");
b.ToTable("F_achlog", (string)null);
});
modelBuilder.Entity("asg_form.Controllers.schedule+team_game", b =>
{
b.Property<long>("id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
b.Property<string>("belong")
.HasColumnType("nvarchar(max)");
b.Property<string>("bilibiliuri")
.HasColumnType("nvarchar(max)");
b.Property<string>("commentary")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("opentime")
.HasColumnType("datetime2");
b.Property<string>("referee")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("tag")
.HasColumnType("nvarchar(max)");
b.Property<string>("team1_name")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<int>("team1_piaoshu")
.HasColumnType("int");
b.Property<string>("team2_name")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<int>("team2_piaoshu")
.HasColumnType("int");
b.Property<string>("winteam")
.HasColumnType("nvarchar(max)");
b.HasKey("id");
b.ToTable("F_game", (string)null);
});
modelBuilder.Entity("asg_form.Model.T_events", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("events_rule_uri")
.HasColumnType("nvarchar(max)");
b.Property<bool?>("is_over")
.HasColumnType("bit");
b.Property<string>("name")
.HasColumnType("nvarchar(max)");
b.Property<DateTime?>("opentime")
.HasColumnType("datetime2");
b.HasKey("Id");
b.ToTable("F_events", (string)null);
});
modelBuilder.Entity("asg_form.Role", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("nvarchar(max)");
b.Property<string>("Name")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<string>("NormalizedName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<string>("msg")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("Id");
b.HasIndex("NormalizedName")
.IsUnique()
.HasDatabaseName("RoleNameIndex")
.HasFilter("[NormalizedName] IS NOT NULL");
b.ToTable("AspNetRoles", (string)null);
});
modelBuilder.Entity("asg_form.User", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("Id"));
b.Property<int>("AccessFailedCount")
.HasColumnType("int");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2");
b.Property<string>("Email")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<bool>("EmailConfirmed")
.HasColumnType("bit");
b.Property<long?>("Integral")
.HasColumnType("bigint");
b.Property<bool>("LockoutEnabled")
.HasColumnType("bit");
b.Property<DateTimeOffset?>("LockoutEnd")
.HasColumnType("datetimeoffset");
b.Property<string>("NormalizedEmail")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<string>("NormalizedUserName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<string>("PasswordHash")
.HasColumnType("nvarchar(max)");
b.Property<string>("PhoneNumber")
.HasColumnType("nvarchar(max)");
b.Property<bool>("PhoneNumberConfirmed")
.HasColumnType("bit");
b.Property<string>("SecurityStamp")
.HasColumnType("nvarchar(max)");
b.Property<bool>("TwoFactorEnabled")
.HasColumnType("bit");
b.Property<string>("UserBase64")
.HasColumnType("nvarchar(max)");
b.Property<string>("UserName")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<string>("chinaname")
.HasColumnType("nvarchar(max)");
b.Property<long?>("haveformId")
.HasColumnType("bigint");
b.Property<bool?>("isbooking")
.HasColumnType("bit");
b.Property<string>("officium")
.HasColumnType("nvarchar(max)");
b.Property<int>("point")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("NormalizedEmail")
.HasDatabaseName("EmailIndex");
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasDatabaseName("UserNameIndex")
.HasFilter("[NormalizedUserName] IS NOT NULL");
b.HasIndex("haveformId");
b.ToTable("AspNetUsers", (string)null);
});
modelBuilder.Entity("asg_form.blog+blog_db", b =>
{
b.Property<long>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("ID"));
b.Property<string>("formuser")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("msg")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<DateTime>("pushtime")
.HasColumnType("datetime2");
b.Property<string>("title")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("ID");
b.ToTable("F_blog", (string)null);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<long>", b =>
{
b.HasOne("asg_form.Role", null)
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserClaim<long>", b =>
{
b.HasOne("asg_form.User", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserLogin<long>", b =>
{
b.HasOne("asg_form.User", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserRole<long>", b =>
{
b.HasOne("asg_form.Role", null)
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("asg_form.User", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityUserToken<long>", b =>
{
b.HasOne("asg_form.User", null)
.WithMany()
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("asg_form.Controllers.Champion+T_Champion", b =>
{
b.HasOne("asg_form.Model.T_events", "events")
.WithMany()
.HasForeignKey("eventsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("asg_form.Controllers.form", "form")
.WithMany()
.HasForeignKey("formId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("events");
b.Navigation("form");
});
modelBuilder.Entity("asg_form.Controllers.Store.StoreinfoDB", b =>
{
b.HasOne("asg_form.Controllers.Store.StoreDB", "Store")
.WithMany("buyer")
.HasForeignKey("Storeid")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Store");
});
modelBuilder.Entity("asg_form.Controllers.form", b =>
{
b.HasOne("asg_form.Model.T_events", "events")
.WithMany("forms")
.HasForeignKey("eventsId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("events");
});
modelBuilder.Entity("asg_form.Controllers.role", b =>
{
b.HasOne("asg_form.Controllers.form", "form")
.WithMany("role")
.HasForeignKey("formId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("form");
});
modelBuilder.Entity("asg_form.Controllers.schedule+schedule_log", b =>
{
b.HasOne("asg_form.Controllers.schedule+team_game", "team")
.WithMany("logs")
.HasForeignKey("teamid")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("team");
});
modelBuilder.Entity("asg_form.User", b =>
{
b.HasOne("asg_form.Controllers.form", "haveform")
.WithMany()
.HasForeignKey("haveformId");
b.Navigation("haveform");
});
modelBuilder.Entity("asg_form.Controllers.Store.StoreDB", b =>
{
b.Navigation("buyer");
});
modelBuilder.Entity("asg_form.Controllers.form", b =>
{
b.Navigation("role");
});
modelBuilder.Entity("asg_form.Controllers.schedule+team_game", b =>
{
b.Navigation("logs");
});
modelBuilder.Entity("asg_form.Model.T_events", b =>
{
b.Navigation("forms");
});
#pragma warning restore 612, 618
}
}
}

View File

@ -0,0 +1,88 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace asg_form.Migrations
{
/// <inheritdoc />
public partial class stort : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<long>(
name: "Integral",
table: "AspNetUsers",
type: "bigint",
nullable: true);
migrationBuilder.AddColumn<int>(
name: "point",
table: "AspNetUsers",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.CreateTable(
name: "StoreDB",
columns: table => new
{
id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Name = table.Column<string>(type: "nvarchar(max)", nullable: false),
Price = table.Column<long>(type: "bigint", nullable: false),
description = table.Column<string>(type: "nvarchar(max)", nullable: false),
information = table.Column<string>(type: "nvarchar(max)", nullable: false),
Type = table.Column<string>(type: "nvarchar(max)", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_StoreDB", x => x.id);
});
migrationBuilder.CreateTable(
name: "F_Store",
columns: table => new
{
id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
buyerid = table.Column<long>(type: "bigint", nullable: false),
Storeid = table.Column<long>(type: "bigint", nullable: false),
isVerification = table.Column<bool>(type: "bit", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_F_Store", x => x.id);
table.ForeignKey(
name: "FK_F_Store_StoreDB_Storeid",
column: x => x.Storeid,
principalTable: "StoreDB",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_F_Store_Storeid",
table: "F_Store",
column: "Storeid");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "F_Store");
migrationBuilder.DropTable(
name: "StoreDB");
migrationBuilder.DropColumn(
name: "Integral",
table: "AspNetUsers");
migrationBuilder.DropColumn(
name: "point",
table: "AspNetUsers");
}
}
}

View File

@ -152,29 +152,60 @@ namespace asg_form.Migrations
b.ToTable("F_Champion", (string)null);
});
modelBuilder.Entity("asg_form.Controllers.Events+T_events", b =>
modelBuilder.Entity("asg_form.Controllers.Store.StoreDB", b =>
{
b.Property<int>("Id")
b.Property<long>("id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
b.Property<string>("events_rule_uri")
b.Property<string>("Name")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<bool?>("is_over")
b.Property<long>("Price")
.HasColumnType("bigint");
b.Property<string>("Type")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("description")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.Property<string>("information")
.IsRequired()
.HasColumnType("nvarchar(max)");
b.HasKey("id");
b.ToTable("StoreDB");
});
modelBuilder.Entity("asg_form.Controllers.Store.StoreinfoDB", b =>
{
b.Property<long>("id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("id"));
b.Property<long>("Storeid")
.HasColumnType("bigint");
b.Property<long>("buyerid")
.HasColumnType("bigint");
b.Property<bool>("isVerification")
.HasColumnType("bit");
b.Property<string>("name")
.HasColumnType("nvarchar(max)");
b.HasKey("id");
b.Property<DateTime?>("opentime")
.HasColumnType("datetime2");
b.HasIndex("Storeid");
b.HasKey("Id");
b.ToTable("F_events", (string)null);
b.ToTable("F_Store", (string)null);
});
modelBuilder.Entity("asg_form.Controllers.T_Friend", b =>
@ -455,6 +486,31 @@ namespace asg_form.Migrations
b.ToTable("F_game", (string)null);
});
modelBuilder.Entity("asg_form.Model.T_events", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("int");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
b.Property<string>("events_rule_uri")
.HasColumnType("nvarchar(max)");
b.Property<bool?>("is_over")
.HasColumnType("bit");
b.Property<string>("name")
.HasColumnType("nvarchar(max)");
b.Property<DateTime?>("opentime")
.HasColumnType("datetime2");
b.HasKey("Id");
b.ToTable("F_events", (string)null);
});
modelBuilder.Entity("asg_form.Role", b =>
{
b.Property<long>("Id")
@ -514,6 +570,9 @@ namespace asg_form.Migrations
b.Property<bool>("EmailConfirmed")
.HasColumnType("bit");
b.Property<long?>("Integral")
.HasColumnType("bigint");
b.Property<bool>("LockoutEnabled")
.HasColumnType("bit");
@ -562,6 +621,9 @@ namespace asg_form.Migrations
b.Property<string>("officium")
.HasColumnType("nvarchar(max)");
b.Property<int>("point")
.HasColumnType("int");
b.HasKey("Id");
b.HasIndex("NormalizedEmail")
@ -658,7 +720,7 @@ namespace asg_form.Migrations
modelBuilder.Entity("asg_form.Controllers.Champion+T_Champion", b =>
{
b.HasOne("asg_form.Controllers.Events+T_events", "events")
b.HasOne("asg_form.Model.T_events", "events")
.WithMany()
.HasForeignKey("eventsId")
.OnDelete(DeleteBehavior.Cascade)
@ -675,9 +737,20 @@ namespace asg_form.Migrations
b.Navigation("form");
});
modelBuilder.Entity("asg_form.Controllers.Store.StoreinfoDB", b =>
{
b.HasOne("asg_form.Controllers.Store.StoreDB", "Store")
.WithMany("buyer")
.HasForeignKey("Storeid")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Store");
});
modelBuilder.Entity("asg_form.Controllers.form", b =>
{
b.HasOne("asg_form.Controllers.Events+T_events", "events")
b.HasOne("asg_form.Model.T_events", "events")
.WithMany("forms")
.HasForeignKey("eventsId")
.OnDelete(DeleteBehavior.Cascade)
@ -717,9 +790,9 @@ namespace asg_form.Migrations
b.Navigation("haveform");
});
modelBuilder.Entity("asg_form.Controllers.Events+T_events", b =>
modelBuilder.Entity("asg_form.Controllers.Store.StoreDB", b =>
{
b.Navigation("forms");
b.Navigation("buyer");
});
modelBuilder.Entity("asg_form.Controllers.form", b =>
@ -731,6 +804,11 @@ namespace asg_form.Migrations
{
b.Navigation("logs");
});
modelBuilder.Entity("asg_form.Model.T_events", b =>
{
b.Navigation("forms");
});
#pragma warning restore 612, 618
}
}

View File

@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.FileProviders;
using Microsoft.Extensions.Hosting;
using Microsoft.IdentityModel.Tokens;
using Microsoft.OpenApi.Models;
using Mirai.Net.Sessions;
@ -21,6 +22,7 @@ using System.Text;
Console.WriteLine("\n _____ _________ ________ \n / _ \\ / _____// _____/ \n / /_\\ \\ \\_____ \\/ \\ ___ \n/ | \\/ \\ \\_\\ \\\n\\____|__ /_______ /\\______ /\n \\/ \\/ \\/ \n__________ __ ___________ .___\n\\______ \\_____ ____ | | __\\_ _____/ ____ __| _/\n | | _/\\__ \\ _/ ___\\| |/ / | __)_ / \\ / __ | \n | | \\ / __ \\\\ \\___| < | \\ | \\/ /_/ | \n |______ /(____ /\\___ >__|_ \\/_______ /___| /\\____ | \n \\/ \\/ \\/ \\/ \\/ \\/ \\/ ");
var builder = WebApplication.CreateBuilder(args);
//builder.AddServiceDefaults();
// Add services to the container.