using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace VOL.Core.Migrations { public partial class _20250624v1 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "S_Device", columns: table => new { Id = table.Column(type: "int", nullable: false, comment: "Id") .Annotation("SqlServer:Identity", "1, 1"), Code = table.Column(type: "nvarchar(100)", nullable: true, comment: "AI设备的唯一编码"), Name = table.Column(type: "nvarchar(200)", nullable: true, comment: "AI设备名称"), DeviceType = table.Column(type: "int", nullable: false, comment: "设备类型"), SchoolCode = table.Column(type: "nvarchar(100)", nullable: true, comment: "学校编号"), StudentNo = table.Column(type: "nvarchar(100)", nullable: true, comment: "学生学号") }, constraints: table => { table.PrimaryKey("PK_S_Device", x => x.Id); }); migrationBuilder.CreateTable( name: "S_GatewayAssocSchool", columns: table => new { Id = table.Column(type: "int", nullable: false, comment: "Id") .Annotation("SqlServer:Identity", "1, 1"), SchoolCode = table.Column(type: "nvarchar(100)", nullable: true, comment: "学校编号"), Code = table.Column(type: "nvarchar(100)", nullable: true, comment: "AI设备的唯一编码"), Mac = table.Column(type: "nvarchar(100)", nullable: true, comment: "设备的Mac地址") }, constraints: table => { table.PrimaryKey("PK_S_GatewayAssocSchool", x => x.Id); }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "S_Device"); migrationBuilder.DropTable( name: "S_GatewayAssocSchool"); } } }