using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace YD_WeChatApplet.Api.Migrations { public partial class AddPostureReport : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "WCA_PostureReport", columns: table => new { Id = table.Column(type: "int", nullable: false, comment: "Id") .Annotation("SqlServer:Identity", "1, 1"), SchoolCode = table.Column(type: "nvarchar(100)", nullable: false, comment: "学校编号"), StudentName = table.Column(type: "nvarchar(100)", nullable: false, comment: "学生姓名"), StudentNo = table.Column(type: "nvarchar(100)", nullable: false, comment: "学生学号"), GradeName = table.Column(type: "nvarchar(100)", nullable: false, comment: "年级名称"), ClassName = table.Column(type: "nvarchar(100)", nullable: false, comment: "班级名称"), GradeId = table.Column(type: "int", nullable: false, comment: "年级Id"), ClassId = table.Column(type: "int", nullable: false, comment: "班级Id"), TeacherId = table.Column(type: "int", nullable: false, comment: "老师Id"), TeacherName = table.Column(type: "nvarchar(100)", nullable: false, comment: "老师姓名"), ReportContent = table.Column(type: "nvarchar(max)", nullable: false, comment: "报告内容"), CreateTime = table.Column(type: "datetime", nullable: false, comment: "创建时间") }, constraints: table => { table.PrimaryKey("PK_WCA_PostureReport", x => x.Id); }); migrationBuilder.CreateIndex( name: "IX_WCA_PostureReport_SchoolCode_StudentNo_CreateTime", table: "WCA_PostureReport", columns: new[] { "SchoolCode", "StudentNo", "CreateTime" }); migrationBuilder.CreateIndex( name: "IX_WCA_PostureReport_TeacherId_CreateTime", table: "WCA_PostureReport", columns: new[] { "TeacherId", "CreateTime" }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "WCA_PostureReport"); } } }