604 lines
45 KiB
C#
604 lines
45 KiB
C#
using System;
|
||
using Microsoft.EntityFrameworkCore.Migrations;
|
||
|
||
#nullable disable
|
||
|
||
namespace YD_YiLu.Api.Migrations
|
||
{
|
||
public partial class _20260402v1 : Migration
|
||
{
|
||
protected override void Up(MigrationBuilder migrationBuilder)
|
||
{
|
||
migrationBuilder.CreateTable(
|
||
name: "N_HealthStandards",
|
||
columns: table => new
|
||
{
|
||
Id = table.Column<int>(type: "int", nullable: false, comment: "Id")
|
||
.Annotation("SqlServer:Identity", "1, 1"),
|
||
GradeId = table.Column<int>(type: "int", nullable: false, comment: "年级Id"),
|
||
Sex = table.Column<int>(type: "int", nullable: false, comment: "性别"),
|
||
CategoryEnum = table.Column<string>(type: "nvarchar(100)", nullable: false, comment: "类别名称"),
|
||
Rank = table.Column<string>(type: "nvarchar(100)", nullable: false, comment: "等级"),
|
||
Score = table.Column<double>(type: "float", nullable: false, comment: "得分"),
|
||
MinValue = table.Column<double>(type: "float", nullable: false, comment: "标准值(小)"),
|
||
MaxValue = table.Column<double>(type: "float", nullable: false, comment: "标准值(大)"),
|
||
Creator = table.Column<int>(type: "int)", nullable: false, comment: "创建人"),
|
||
CreateDate = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
|
||
Modifier = table.Column<int>(type: "int)", nullable: false, comment: "修改人"),
|
||
ModifyDate = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_N_HealthStandards", x => x.Id);
|
||
});
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "N_SportsTestCategory",
|
||
columns: table => new
|
||
{
|
||
Id = table.Column<int>(type: "int", nullable: false, comment: "Id")
|
||
.Annotation("SqlServer:Identity", "1, 1"),
|
||
CategoryName = table.Column<string>(type: "nvarchar(100)", nullable: false, comment: "类别名称"),
|
||
CategoryEnum = table.Column<string>(type: "nvarchar(100)", nullable: false, comment: "类别名称"),
|
||
StatisticType = table.Column<int>(type: "int", nullable: false, comment: "统计类型"),
|
||
IsRopeSkip = table.Column<int>(type: "int", nullable: false, comment: "是否是跳绳"),
|
||
Creator = table.Column<int>(type: "int)", nullable: false, comment: "创建人"),
|
||
CreateDate = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
|
||
Modifier = table.Column<int>(type: "int)", nullable: false, comment: "修改人"),
|
||
ModifyDate = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_N_SportsTestCategory", x => x.Id);
|
||
});
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "N_SportsTestValue",
|
||
columns: table => new
|
||
{
|
||
Id = table.Column<int>(type: "int", nullable: false, comment: "Id")
|
||
.Annotation("SqlServer:Identity", "1, 1"),
|
||
SchoolCode = table.Column<string>(type: "nvarchar(100)", nullable: false, comment: "学校编号"),
|
||
TeacherId = table.Column<int>(type: "int", nullable: false, comment: "老师Id"),
|
||
TeacherName = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "老师名称"),
|
||
GradeId = table.Column<int>(type: "int", nullable: false, comment: "年级Id"),
|
||
GradeName = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "年级名称"),
|
||
ClassId = table.Column<int>(type: "int", nullable: false, comment: "班级Id"),
|
||
ClassName = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "班级名称"),
|
||
StudentNo = table.Column<string>(type: "nvarchar(100)", nullable: false, comment: "学生学号"),
|
||
StudentName = table.Column<string>(type: "nvarchar(100)", nullable: false, comment: "学生名称"),
|
||
Sex = table.Column<int>(type: "int", nullable: false, comment: "性别"),
|
||
CategoryValue = table.Column<int>(type: "int", nullable: false, comment: "类别枚举值"),
|
||
CategoryEnum = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "类别名称"),
|
||
Value = table.Column<double>(type: "float", nullable: false, comment: "测试结果"),
|
||
MotionDuration = table.Column<int>(type: "int", nullable: false, comment: "运动时长/分钟"),
|
||
Consumption = table.Column<int>(type: "int", nullable: false, comment: "运动消耗"),
|
||
Strength = table.Column<int>(type: "int", nullable: false, comment: "运动强度"),
|
||
Score = table.Column<double>(type: "float", nullable: false, comment: "得分"),
|
||
AdditionalScore = table.Column<double>(type: "float", nullable: false, comment: "附加分"),
|
||
RankEnum = table.Column<int>(type: "int", nullable: false, comment: "训练成绩等级"),
|
||
Rank = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "等级"),
|
||
ClassRank = table.Column<int>(type: "int", nullable: false, comment: "班级排名"),
|
||
DataSource = table.Column<int>(type: "int", nullable: false, comment: "数据来源"),
|
||
WrongResults = table.Column<double>(type: "float", nullable: true, comment: "错误成绩"),
|
||
ScoreTime = table.Column<DateTime>(type: "datetime", nullable: false, comment: "测试时间"),
|
||
Height = table.Column<double>(type: "float", nullable: true, comment: "身高"),
|
||
Weight = table.Column<double>(type: "float", nullable: true, comment: "体重"),
|
||
Remarks = table.Column<string>(type: "text", nullable: true, comment: "备注"),
|
||
Year = table.Column<int>(type: "int)", nullable: false, comment: "当前年份"),
|
||
Semester = table.Column<int>(type: "int)", nullable: false, comment: "学期"),
|
||
Creator = table.Column<int>(type: "int)", nullable: false, comment: "创建人"),
|
||
CreateDate = table.Column<DateTime>(type: "datetime", nullable: false, comment: "创建时间"),
|
||
Modifier = table.Column<int>(type: "int)", nullable: false, comment: "修改人"),
|
||
ModifyDate = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
|
||
IsDisplay = table.Column<bool>(type: "bit", nullable: false, comment: "是否显示")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_N_SportsTestValue", x => x.Id);
|
||
});
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "S_Class",
|
||
columns: table => new
|
||
{
|
||
Id = table.Column<int>(type: "int", nullable: false, comment: "Id")
|
||
.Annotation("SqlServer:Identity", "1, 1"),
|
||
SchoolCode = table.Column<string>(type: "nvarchar(100)", nullable: false, comment: "学校编号"),
|
||
GradeId = table.Column<int>(type: "int", nullable: false, comment: "年级Id"),
|
||
GradeName = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "年级名称"),
|
||
ClassName = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "班级名称")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_S_Class", x => x.Id);
|
||
});
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "S_Grade",
|
||
columns: table => new
|
||
{
|
||
Id = table.Column<int>(type: "int", nullable: false, comment: "Id")
|
||
.Annotation("SqlServer:Identity", "1, 1"),
|
||
SchoolCode = table.Column<string>(type: "nvarchar(100)", nullable: false, comment: "学校编号"),
|
||
GradeName = table.Column<string>(type: "nvarchar(100)", nullable: false, comment: "年级名称"),
|
||
Remarks = table.Column<string>(type: "text", nullable: false, comment: "备注"),
|
||
Creator = table.Column<int>(type: "int)", nullable: false, comment: "创建人"),
|
||
CreateDate = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
|
||
Modifier = table.Column<int>(type: "int)", nullable: false, comment: "修改人"),
|
||
ModifyDate = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_S_Grade", x => x.Id);
|
||
});
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "S_School",
|
||
columns: table => new
|
||
{
|
||
Id = table.Column<int>(type: "int", nullable: false, comment: "Id")
|
||
.Annotation("SqlServer:Identity", "1, 1"),
|
||
SchoolNatureId = table.Column<int>(type: "int", nullable: false, comment: "学校性质Id"),
|
||
SchoolCode = table.Column<string>(type: "nvarchar(100)", nullable: false, comment: "学校编号"),
|
||
SchoolName = table.Column<string>(type: "nvarchar(100)", nullable: false, comment: "学校名称"),
|
||
Province = table.Column<string>(type: "nvarchar(20)", nullable: false, comment: "所属省份"),
|
||
City = table.Column<string>(type: "nvarchar(20)", nullable: false, comment: "所属城市"),
|
||
Area = table.Column<string>(type: "nvarchar(20)", nullable: false, comment: "所属区域"),
|
||
Remarks = table.Column<string>(type: "text", nullable: false, comment: "备注"),
|
||
Creator = table.Column<int>(type: "int)", nullable: false, comment: "创建人"),
|
||
CreateDate = table.Column<DateTime>(type: "datetime", nullable: false, comment: "创建时间"),
|
||
Modifier = table.Column<int>(type: "int)", nullable: false, comment: "修改人"),
|
||
ModifyDate = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_S_School", x => x.Id);
|
||
});
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "S_SchoolAssocGrade",
|
||
columns: table => new
|
||
{
|
||
Id = table.Column<int>(type: "int", nullable: false, comment: "Id")
|
||
.Annotation("SqlServer:Identity", "1, 1"),
|
||
SchoolCode = table.Column<string>(type: "nvarchar(100)", nullable: false, comment: "学校编号"),
|
||
GradeId = table.Column<int>(type: "int", nullable: false, comment: "年级Id"),
|
||
Creator = table.Column<int>(type: "int)", nullable: false, comment: "创建人"),
|
||
CreateDate = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
|
||
Modifier = table.Column<int>(type: "int)", nullable: false, comment: "修改人"),
|
||
ModifyDate = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_S_SchoolAssocGrade", x => x.Id);
|
||
});
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "S_Student",
|
||
columns: table => new
|
||
{
|
||
Id = table.Column<int>(type: "int", nullable: false, comment: "Id")
|
||
.Annotation("SqlServer:Identity", "1, 1"),
|
||
SchoolCode = table.Column<string>(type: "nvarchar(100)", nullable: false, comment: "学校编号"),
|
||
ClassId = table.Column<int>(type: "int", nullable: true, comment: "班级Id"),
|
||
ClassName = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "班级名称"),
|
||
StudentNo = table.Column<string>(type: "nvarchar(100)", nullable: false, comment: "学生学号"),
|
||
SchoolRollNo = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "学籍号"),
|
||
PlaceSchoolRollNo = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "地方学籍号"),
|
||
HeartRateFrontNo = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "心率设备正面编号"),
|
||
HeartRateId = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "心率设备ID"),
|
||
HeartRateQRCode = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "心率设备二维码编号"),
|
||
RopeSkipQRCode = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "跳绳编号"),
|
||
RopeSkipNo = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "跳绳二维码编号"),
|
||
RunChipNo = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "中长跑芯片编号"),
|
||
TotalTrainTime = table.Column<double>(type: "float", nullable: true, comment: "训练时长"),
|
||
TotalTrainNumber = table.Column<int>(type: "int", nullable: true, comment: "训练次数"),
|
||
IDCard = table.Column<string>(type: "nvarchar(50)", nullable: true, comment: "身份证"),
|
||
StudentNation = table.Column<string>(type: "nvarchar(50)", nullable: true, comment: "学生名族"),
|
||
StudentName = table.Column<string>(type: "nvarchar(100)", nullable: false, comment: "学生名称"),
|
||
Age = table.Column<int>(type: "int", nullable: false, comment: "年龄"),
|
||
Sex = table.Column<int>(type: "int", nullable: false, comment: "性别"),
|
||
Photo = table.Column<string>(type: "nvarchar(2000)", nullable: true, comment: "学生照片"),
|
||
Nation = table.Column<string>(type: "nvarchar(20)", nullable: true, comment: "民族"),
|
||
HomeAddress = table.Column<string>(type: "nvarchar(200)", nullable: true, comment: "家庭住址"),
|
||
StudentStatus = table.Column<int>(type: "int", nullable: true, comment: "状态"),
|
||
Birthday = table.Column<DateTime>(type: "datetime", nullable: true, comment: "出生日期"),
|
||
ParentName = table.Column<string>(type: "nvarchar(20)", nullable: true, comment: "家长姓名"),
|
||
ParentPhoneNo = table.Column<string>(type: "nvarchar(20)", nullable: true, comment: "家长联系方式"),
|
||
AppletPwd = table.Column<string>(type: "nvarchar(100)", nullable: true, comment: "小程序密码"),
|
||
Remarks = table.Column<string>(type: "text", nullable: true, comment: "备注"),
|
||
Creator = table.Column<int>(type: "int)", nullable: true, comment: "创建人"),
|
||
CreateDate = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
|
||
Modifier = table.Column<int>(type: "int)", nullable: true, comment: "修改人"),
|
||
ModifyDate = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_S_Student", x => x.Id);
|
||
});
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "Sys_User",
|
||
columns: table => new
|
||
{
|
||
User_Id = table.Column<int>(type: "int", nullable: false)
|
||
.Annotation("SqlServer:Identity", "1, 1"),
|
||
UserName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||
Gender = table.Column<int>(type: "int", nullable: false),
|
||
HeadImageUrl = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false),
|
||
Dept_Id = table.Column<int>(type: "int", nullable: true),
|
||
DeptName = table.Column<string>(type: "nvarchar(150)", maxLength: 150, nullable: false),
|
||
Role_Id = table.Column<int>(type: "int", nullable: false),
|
||
RoleName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
|
||
Token = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: false),
|
||
AppType = table.Column<int>(type: "int", nullable: true),
|
||
UserTrueName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
|
||
SchoolCode = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
|
||
SchoolName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
|
||
UserPwd = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
|
||
CreateDate = table.Column<DateTime>(type: "datetime", nullable: true),
|
||
PhoneNo = table.Column<string>(type: "nvarchar(11)", maxLength: 11, nullable: false),
|
||
CreateID = table.Column<int>(type: "int", nullable: true),
|
||
Creator = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
|
||
Enable = table.Column<int>(type: "int", nullable: false),
|
||
ModifyID = table.Column<int>(type: "int", nullable: true),
|
||
Modifier = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
|
||
ModifyDate = table.Column<DateTime>(type: "datetime", nullable: true),
|
||
AuditDate = table.Column<DateTime>(type: "datetime", nullable: true),
|
||
LastLoginDate = table.Column<DateTime>(type: "datetime", nullable: true),
|
||
LastModifyPwdDate = table.Column<DateTime>(type: "datetime", nullable: true),
|
||
Address = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
|
||
Email = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||
Remark = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false)
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_Sys_User", x => x.User_Id);
|
||
});
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "XW_ProjectMode",
|
||
columns: table => new
|
||
{
|
||
Id = table.Column<int>(type: "int", nullable: false, comment: "Id")
|
||
.Annotation("SqlServer:Identity", "1, 1"),
|
||
ProjectKind = table.Column<int>(type: "int", nullable: false, comment: "ProjectKind"),
|
||
Name = table.Column<string>(type: "nvarchar(100)", nullable: false, comment: "名称"),
|
||
CategoryEnum = table.Column<string>(type: "nvarchar(100)", nullable: false, comment: "枚举")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_XW_ProjectMode", x => x.Id);
|
||
});
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "XW_SportsTestData",
|
||
columns: table => new
|
||
{
|
||
Id = table.Column<int>(type: "int", nullable: false, comment: "Id")
|
||
.Annotation("SqlServer:Identity", "1, 1"),
|
||
ExaminationId = table.Column<int>(type: "int", nullable: true, comment: "考试id"),
|
||
ExaminationName = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "考试名称"),
|
||
ProjectType = table.Column<int>(type: "int", nullable: true, comment: "项目类型(1体检 2体质)"),
|
||
ProjectId = table.Column<int>(type: "int", nullable: true, comment: "项目ID"),
|
||
ProjectName = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "项目名称"),
|
||
RosterType = table.Column<int>(type: "int", nullable: true, comment: "模式类型(1随堂模式2名单模式3刷卡或手动录入)"),
|
||
OrgId = table.Column<int>(type: "int", nullable: true, comment: "学校ID"),
|
||
GradeId = table.Column<int>(type: "int", nullable: true, comment: "年级ID"),
|
||
GradeName = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "年级名称"),
|
||
ClassId = table.Column<int>(type: "int", nullable: true, comment: "班级或者名单id(根据roster_type来判断)"),
|
||
ClassName = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "班级名称"),
|
||
GroupId = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "组别"),
|
||
TeacherId = table.Column<int>(type: "int", nullable: true, comment: "老师ID"),
|
||
TeacherName = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "老师名称"),
|
||
ModelType = table.Column<int>(type: "int", nullable: true, comment: "训练模式"),
|
||
MarkType = table.Column<int>(type: "int", nullable: true, comment: "评分标准类型(1国家标准2地方标准3自定义标准)"),
|
||
ProjectKind = table.Column<int>(type: "int", nullable: true, comment: "项目类型(1跳绳2跑步)"),
|
||
ProjectRuleId = table.Column<int>(type: "int", nullable: true, comment: "训练标准ID"),
|
||
ProjectKindName = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "项目类型名称"),
|
||
MarkTypeName = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "评分标准类型名称"),
|
||
ModelTypeName = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "项目模式名称"),
|
||
TrainCount = table.Column<int>(type: "int", nullable: true, comment: "训练人数"),
|
||
StartTime = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "开始时间"),
|
||
EndTime = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "结束时间"),
|
||
MaleTotal = table.Column<int>(type: "int", nullable: true, comment: "男生总数"),
|
||
FemaleTotal = table.Column<int>(type: "int", nullable: true, comment: "女生总数"),
|
||
MaleCount = table.Column<double>(type: "float", nullable: true, comment: "男生总成绩"),
|
||
MaleMaxCount = table.Column<int>(type: "int", nullable: true, comment: "男生最大值"),
|
||
MaleMinCount = table.Column<int>(type: "int", nullable: true, comment: "男生最小值"),
|
||
FemaleCount = table.Column<double>(type: "float", nullable: true, comment: "女生总成绩"),
|
||
FemaleMaxCount = table.Column<int>(type: "int", nullable: true, comment: "女生最大值"),
|
||
FemaleMinCount = table.Column<int>(type: "int", nullable: true, comment: "女生最小值"),
|
||
MaleScore = table.Column<double>(type: "float", nullable: true, comment: "男生总分数"),
|
||
MaleMaxScore = table.Column<double>(type: "float", nullable: true, comment: "男生最大分数"),
|
||
MaleMinScore = table.Column<double>(type: "float", nullable: true, comment: "男生最小分数"),
|
||
FemaleScore = table.Column<double>(type: "float", nullable: true, comment: "女生总分数"),
|
||
FemaleMaxScore = table.Column<double>(type: "float", nullable: true, comment: "女生最大分数"),
|
||
FemaleMinScore = table.Column<double>(type: "float", nullable: true, comment: "女生最小分数"),
|
||
MaleFine = table.Column<int>(type: "int", nullable: true, comment: "男生优秀人数"),
|
||
MaleGood = table.Column<int>(type: "int", nullable: true, comment: "男生良好人数"),
|
||
MalePass = table.Column<int>(type: "int", nullable: true, comment: "男生及格人数"),
|
||
MaleFail = table.Column<int>(type: "int", nullable: true, comment: "男生不及格人数"),
|
||
FemaleFine = table.Column<int>(type: "int", nullable: true, comment: "女生优秀人数"),
|
||
FemaleGood = table.Column<int>(type: "int", nullable: true, comment: "女生良好人数"),
|
||
FemalePass = table.Column<int>(type: "int", nullable: true, comment: "女生及格人数"),
|
||
FemaleFail = table.Column<int>(type: "int", nullable: true, comment: "女生不及格人数"),
|
||
PassingRate = table.Column<double>(type: "float", nullable: true, comment: "及格率"),
|
||
MaleAvgCount = table.Column<double>(type: "float", nullable: true, comment: "男生平均个数"),
|
||
FemaleAvgCount = table.Column<double>(type: "float", nullable: true, comment: "女生平均个数"),
|
||
MaleAvgScore = table.Column<double>(type: "float", nullable: true, comment: "男生平均分数"),
|
||
FemaleAvgScore = table.Column<double>(type: "float", nullable: true, comment: "女生平均分数"),
|
||
MaleMedianCount = table.Column<double>(type: "float", nullable: true, comment: "男生中位数"),
|
||
FemaleMedianCount = table.Column<double>(type: "float", nullable: true, comment: "女生中位数"),
|
||
MaleAvgImproveCount = table.Column<int>(type: "int", nullable: true, comment: "男生平均值"),
|
||
MaleMaxImproveCount = table.Column<int>(type: "int", nullable: true, comment: "男生最大值"),
|
||
MaleMinImproveCount = table.Column<int>(type: "int", nullable: true, comment: "男生最小值"),
|
||
FemaleAvgImproveCount = table.Column<int>(type: "int", nullable: true, comment: "女生平均值"),
|
||
FemaleMaxImproveCount = table.Column<int>(type: "int", nullable: true, comment: "女生最大值"),
|
||
FemaleMinImproveCount = table.Column<int>(type: "int", nullable: true, comment: "女生最小值"),
|
||
MaleAvgImproveScore = table.Column<double>(type: "float", nullable: true, comment: "男生平均分数"),
|
||
MaleMaxImproveScore = table.Column<double>(type: "float", nullable: true, comment: "男生最大分数"),
|
||
MaleMinImproveScore = table.Column<double>(type: "float", nullable: true, comment: "男生最小分数"),
|
||
FemaleAvgImproveScore = table.Column<double>(type: "float", nullable: true, comment: "女生平均分数"),
|
||
FemaleMaxImproveScore = table.Column<double>(type: "float", nullable: true, comment: "女生最大分数"),
|
||
FemaleMinImproveScore = table.Column<double>(type: "float", nullable: true, comment: "女生最小分数"),
|
||
MinErrorCount = table.Column<int>(type: "int", nullable: true, comment: "失误最少的同学次数"),
|
||
MinIntoStateTime = table.Column<int>(type: "int", nullable: true, comment: "进入状态最快的同学耗时(心率借用这个字段。班级运动时间)"),
|
||
MinAvgTime = table.Column<int>(type: "int", nullable: true, comment: "第一名平均耗时"),
|
||
TotalErrorCount = table.Column<int>(type: "int", nullable: true, comment: "失误总次数"),
|
||
LossesCount1 = table.Column<int>(type: "int", nullable: true, comment: "失误损失次数"),
|
||
LossesCount2 = table.Column<int>(type: "int", nullable: true, comment: "甩绳速度偏慢损失次数"),
|
||
LossesCount3 = table.Column<int>(type: "int", nullable: true, comment: "进入状态过慢损失次数"),
|
||
CheckCode = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "提交标识"),
|
||
CreateTime = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "创建时间"),
|
||
CreateBy = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "创建人"),
|
||
UpdateTime = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "修改时间"),
|
||
UpdateBy = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "修改人"),
|
||
DoubleFlag = table.Column<bool>(type: "bit", nullable: true, comment: "是否双人模式"),
|
||
Source = table.Column<int>(type: "int", nullable: true, comment: "数据来源(1:pad, 2:微信小程序)"),
|
||
StudentName = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "学生姓名")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_XW_SportsTestData", x => x.Id);
|
||
});
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "XW_TestingProject",
|
||
columns: table => new
|
||
{
|
||
Id = table.Column<int>(type: "int", nullable: false, comment: "Id")
|
||
.Annotation("SqlServer:Identity", "1, 1"),
|
||
OrgId = table.Column<int>(type: "int", nullable: false, comment: "OrgId"),
|
||
ProjectId = table.Column<int>(type: "int", nullable: false, comment: "ProjectId"),
|
||
ProjectName = table.Column<string>(type: "nvarchar(100)", nullable: false, comment: "名称"),
|
||
CategoryEnum = table.Column<string>(type: "nvarchar(100)", nullable: false, comment: "枚举"),
|
||
CategoryValue = table.Column<int>(type: "int", nullable: false, comment: "枚举"),
|
||
IsOpen = table.Column<bool>(type: "bit", nullable: false, comment: "IsOpen"),
|
||
IsShow = table.Column<bool>(type: "bit", nullable: false, comment: "IsShow")
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_XW_TestingProject", x => x.Id);
|
||
});
|
||
|
||
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: false),
|
||
TenantName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
|
||
SerialNumber = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
||
AndroidId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
||
IMEI = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
||
IMSI = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
||
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: false)
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_YL_Device", x => x.Id);
|
||
});
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "XW_TrainSetting",
|
||
columns: table => new
|
||
{
|
||
Id = table.Column<int>(type: "int", nullable: false, comment: "Id")
|
||
.Annotation("SqlServer:Identity", "1, 1"),
|
||
TrainId = table.Column<int>(type: "int", nullable: true, comment: "训练ID"),
|
||
CircleCount = table.Column<int>(type: "int", nullable: true, comment: "圈数"),
|
||
CircleInterval = table.Column<int>(type: "int", nullable: true, comment: "每圈时间间隔"),
|
||
FirstCircleWhole = table.Column<decimal>(type: "decimal(18,2)", nullable: true, comment: "首圈是否整圈(1-不完整,2-完整)"),
|
||
FirstCircleInterval = table.Column<int>(type: "int", nullable: true, comment: "首圈时间间隔"),
|
||
DecimalPlace = table.Column<decimal>(type: "decimal(18,2)", nullable: true, comment: "保留秒以下的小数位数"),
|
||
CircleCountGirl = table.Column<int>(type: "int", nullable: true, comment: "女生圈数"),
|
||
CircleIntervalGirl = table.Column<int>(type: "int", nullable: true, comment: "女生每圈时间间隔"),
|
||
FirstCircleWholeGirl = table.Column<decimal>(type: "decimal(18,2)", nullable: true, comment: "女生首圈是否整圈(1-不完整,2-完整)"),
|
||
FirstCircleIntervalGirl = table.Column<int>(type: "int", nullable: true, comment: "女生首圈时间间隔"),
|
||
CreateTime = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "创建时间"),
|
||
CreateBy = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "创建人"),
|
||
XW_SportsTestDataId = table.Column<int>(type: "int", nullable: false)
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_XW_TrainSetting", x => x.Id);
|
||
table.ForeignKey(
|
||
name: "FK_XW_TrainSetting_XW_SportsTestData_XW_SportsTestDataId",
|
||
column: x => x.XW_SportsTestDataId,
|
||
principalTable: "XW_SportsTestData",
|
||
principalColumn: "Id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
});
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "XW_TrainStudents",
|
||
columns: table => new
|
||
{
|
||
Id = table.Column<int>(type: "int", nullable: false, comment: "Id")
|
||
.Annotation("SqlServer:Identity", "1, 1"),
|
||
TrainId = table.Column<int>(type: "int", nullable: true, comment: "训练ID"),
|
||
ProjectId = table.Column<int>(type: "int", nullable: true, comment: "项目ID"),
|
||
ProjectKind = table.Column<int>(type: "int", nullable: true, comment: "项目类型(1跳绳2跑步)"),
|
||
OrgId = table.Column<int>(type: "int", nullable: true, comment: "学校ID"),
|
||
GradeId = table.Column<int>(type: "int", nullable: false, comment: "年级ID"),
|
||
GradeName = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "年级名称"),
|
||
ClassId = table.Column<int>(type: "int", nullable: false, comment: "班级ID"),
|
||
ClassName = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "班级名称"),
|
||
GroupName = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "组别"),
|
||
GroupOrder = table.Column<int>(type: "int", nullable: true, comment: "组号"),
|
||
TeacherId = table.Column<int>(type: "int", nullable: true, comment: "老师ID"),
|
||
DeviceId = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "设备ID"),
|
||
StudentId = table.Column<int>(type: "int", nullable: false, comment: "学生ID"),
|
||
StudentName = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "学生名称"),
|
||
Sex = table.Column<int>(type: "int", nullable: false, comment: "性别(1男2女)"),
|
||
StudentNo = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "学号"),
|
||
Achievement = table.Column<double>(type: "float", nullable: true, comment: "标准成绩"),
|
||
OriginalAchievement = table.Column<int>(type: "int", nullable: true, comment: "原始标准成绩(被格式化小数点之前的)"),
|
||
Achievement2 = table.Column<double>(type: "float", nullable: true, comment: "标准成绩2"),
|
||
OriginalAchievement2 = table.Column<int>(type: "int", nullable: true, comment: "原始标准成绩2(被格式化小数点之前的)"),
|
||
Score = table.Column<double>(type: "float", nullable: false, comment: "得分"),
|
||
PlusesScore = table.Column<double>(type: "float", nullable: true, comment: "加分项得分"),
|
||
Rating = table.Column<int>(type: "int", nullable: true, comment: "评分等级"),
|
||
RankingInGender = table.Column<int>(type: "int", nullable: true, comment: "男生或女生排名"),
|
||
Ranking = table.Column<int>(type: "int", nullable: true, comment: "全体排名"),
|
||
ErrorCount = table.Column<int>(type: "int", nullable: true, comment: "失误总次数"),
|
||
ErrorTime = table.Column<int>(type: "int", nullable: true, comment: "失误总耗时"),
|
||
AvgTime = table.Column<int>(type: "int", nullable: true, comment: "平均耗时"),
|
||
MedianTime = table.Column<int>(type: "int", nullable: true, comment: "有效平均值(中位数)"),
|
||
LossesCount1 = table.Column<int>(type: "int", nullable: true, comment: "失误损失次数"),
|
||
LossesCount2 = table.Column<int>(type: "int", nullable: true, comment: "甩绳速度偏慢损失次数"),
|
||
LossesCount3 = table.Column<int>(type: "int", nullable: true, comment: "进入状态过慢损失次数"),
|
||
HigherScore = table.Column<int>(type: "int", nullable: true, comment: "高一档分数段"),
|
||
IntoStateTime = table.Column<int>(type: "int", nullable: true, comment: "进入状态耗时"),
|
||
ImproveCount = table.Column<int>(type: "int", nullable: true, comment: "次数提升空间"),
|
||
ImproveScore = table.Column<double>(type: "float", nullable: true, comment: "分数提升空间"),
|
||
FamilySendFlag = table.Column<int>(type: "int", nullable: true, comment: "家长消息发送标识"),
|
||
Completed = table.Column<bool>(type: "bit", nullable: true, comment: "是否已经完成"),
|
||
QuantityCompleted = table.Column<int>(type: "int", nullable: true, comment: "实际完成的数量(圈数)"),
|
||
ModelType = table.Column<int>(type: "int", nullable: true, comment: "报表显示"),
|
||
StartTime = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "开始时间"),
|
||
Teacher = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "教师"),
|
||
Times = table.Column<int>(type: "int", nullable: false),
|
||
VideoRecord = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||
CreateTime = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "创建时间"),
|
||
CreateBy = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "创建人"),
|
||
UpdateTime = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "修改时间"),
|
||
UpdateBy = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "修改人"),
|
||
XW_SportsTestDataId = table.Column<int>(type: "int", nullable: false)
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_XW_TrainStudents", x => x.Id);
|
||
table.ForeignKey(
|
||
name: "FK_XW_TrainStudents_XW_SportsTestData_XW_SportsTestDataId",
|
||
column: x => x.XW_SportsTestDataId,
|
||
principalTable: "XW_SportsTestData",
|
||
principalColumn: "Id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
});
|
||
|
||
migrationBuilder.CreateTable(
|
||
name: "XW_TrainViolationsBO",
|
||
columns: table => new
|
||
{
|
||
Id = table.Column<int>(type: "int", nullable: false, comment: "Id")
|
||
.Annotation("SqlServer:Identity", "1, 1"),
|
||
ViolationId = table.Column<int>(type: "int", nullable: true, comment: "违规动作编号"),
|
||
PicUrl = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "违规动图地址"),
|
||
SkipStumblingNumber = table.Column<int>(type: "int", nullable: true, comment: "跳绳绊脚次数"),
|
||
TrainTime = table.Column<string>(type: "nvarchar(max)", nullable: false, comment: "违规动作训练时间"),
|
||
XW_TrainStudentsId = table.Column<int>(type: "int", nullable: false)
|
||
},
|
||
constraints: table =>
|
||
{
|
||
table.PrimaryKey("PK_XW_TrainViolationsBO", x => x.Id);
|
||
table.ForeignKey(
|
||
name: "FK_XW_TrainViolationsBO_XW_TrainStudents_XW_TrainStudentsId",
|
||
column: x => x.XW_TrainStudentsId,
|
||
principalTable: "XW_TrainStudents",
|
||
principalColumn: "Id",
|
||
onDelete: ReferentialAction.Cascade);
|
||
});
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_XW_TrainSetting_XW_SportsTestDataId",
|
||
table: "XW_TrainSetting",
|
||
column: "XW_SportsTestDataId",
|
||
unique: true);
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_XW_TrainStudents_XW_SportsTestDataId",
|
||
table: "XW_TrainStudents",
|
||
column: "XW_SportsTestDataId");
|
||
|
||
migrationBuilder.CreateIndex(
|
||
name: "IX_XW_TrainViolationsBO_XW_TrainStudentsId",
|
||
table: "XW_TrainViolationsBO",
|
||
column: "XW_TrainStudentsId");
|
||
}
|
||
|
||
protected override void Down(MigrationBuilder migrationBuilder)
|
||
{
|
||
migrationBuilder.DropTable(
|
||
name: "N_HealthStandards");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "N_SportsTestCategory");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "N_SportsTestValue");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "S_Class");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "S_Grade");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "S_School");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "S_SchoolAssocGrade");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "S_Student");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "Sys_User");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "XW_ProjectMode");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "XW_TestingProject");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "XW_TrainSetting");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "XW_TrainViolationsBO");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "YL_Device");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "XW_TrainStudents");
|
||
|
||
migrationBuilder.DropTable(
|
||
name: "XW_SportsTestData");
|
||
}
|
||
}
|
||
}
|