YD_SmartSports.Api/VOL.Core/Migrations/20260402010903_20260402v2.cs

48 lines
2.3 KiB
C#
Raw Normal View History

2026-04-16 13:18:24 +08:00
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace VOL.Core.Migrations
{
public partial class _20260402v2 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "YL_Device",
columns: table => new
{
Id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
SportStationId = table.Column<long>(type: "bigint", nullable: false),
OrgId = table.Column<int>(type: "int", nullable: true),
Name = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
TenantName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
SerialNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
AndroidId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
IMEI = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
IMSI = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
IsCalibration = table.Column<int>(type: "int", nullable: false),
IsSynchronization = table.Column<int>(type: "int", nullable: false),
IsActive = table.Column<int>(type: "int", nullable: false),
IsOnline = table.Column<int>(type: "int", nullable: false),
LastOnlineTime = table.Column<DateTime>(type: "datetime2", nullable: true),
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
Remark = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_YL_Device", x => x.Id);
});
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "YL_Device");
}
}
}