using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace VOL.Core.Migrations { public partial class _20260304v1 : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "YL_Device", columns: table => new { Id = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), SportStationId = table.Column(type: "bigint", nullable: false), Name = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), TenantName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: true), SerialNumber = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), AndroidId = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), IMEI = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), IMSI = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), IsCalibration = table.Column(type: "int", nullable: false), IsSynchronization = table.Column(type: "int", nullable: false), IsActive = table.Column(type: "int", nullable: false), IsOnline = table.Column(type: "int", nullable: false), LastOnlineTime = table.Column(type: "datetime2", nullable: true), CreateTime = table.Column(type: "datetime2", nullable: false), UpdateTime = table.Column(type: "datetime2", nullable: true), Remark = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true) }, constraints: table => { table.PrimaryKey("PK_YL_Device", x => x.Id); }); migrationBuilder.CreateTable( name: "YL_Train", columns: table => new { Id = table.Column(type: "bigint", nullable: false) .Annotation("SqlServer:Identity", "1, 1"), DeviceSerial = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), DeviceType = table.Column(type: "int", nullable: false), UserSerial = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), TrainSerial = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), VideoSerial = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), TrainExam = table.Column(type: "int", nullable: false), QuizId = table.Column(type: "int", nullable: true), StandardCounts = table.Column(type: "int", nullable: false), UnStandardCounts = table.Column(type: "int", nullable: false), TimeKeeping = table.Column(type: "float", nullable: true), Duration = table.Column(type: "int", nullable: false), Distance = table.Column(type: "float", nullable: true), CourseId = table.Column(type: "int", nullable: false), StartTime = table.Column(type: "datetime2", nullable: false), EndTime = table.Column(type: "datetime2", nullable: false), Score = table.Column(type: "float", nullable: true), IsValid = table.Column(type: "int", nullable: false), UploadTime = table.Column(type: "datetime2", nullable: false), CreateTime = table.Column(type: "datetime2", nullable: false) }, constraints: table => { table.PrimaryKey("PK_YL_Train", x => x.Id); }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "YL_Device"); migrationBuilder.DropTable( name: "YL_Train"); } } }