YD_SmartSports.Api/VOL.Core/Migrations/20250709031331_20250709v1.cs
2025-07-09 11:21:55 +08:00

63 lines
2.3 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace VOL.Core.Migrations
{
public partial class _20250709v1 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "ClassroomStageId",
table: "Ai_ClassRoomRecord",
type: "int",
nullable: false,
defaultValue: 0,
comment: "阶段Id");
migrationBuilder.CreateTable(
name: "Ai_ClassroomSetting",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false, comment: "Id")
.Annotation("SqlServer:Identity", "1, 1"),
ClassRoomRecordId = table.Column<int>(type: "int", nullable: false, comment: "课堂记录Id"),
ClassroomStageId = table.Column<int>(type: "int", nullable: false, comment: "阶段Id"),
Duration = table.Column<int>(type: "int", nullable: false, comment: "时长"),
Density = table.Column<int>(type: "int", nullable: false, comment: "密度")
},
constraints: table =>
{
table.PrimaryKey("PK_Ai_ClassroomSetting", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Ai_ClassroomStage",
columns: table => new
{
Id = table.Column<int>(type: "int", nullable: false, comment: "Id")
.Annotation("SqlServer:Identity", "1, 1"),
Name = table.Column<string>(type: "nvarchar(200)", nullable: true, comment: "名称")
},
constraints: table =>
{
table.PrimaryKey("PK_Ai_ClassroomStage", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Ai_ClassroomSetting");
migrationBuilder.DropTable(
name: "Ai_ClassroomStage");
migrationBuilder.DropColumn(
name: "ClassroomStageId",
table: "Ai_ClassRoomRecord");
}
}
}