package entity

import (
	"database/sql"
	"time"
)

type ExamPao struct {
	TeamName    string `json:"teamName"`    // 队伍名字
	PositionX   string `json:"positionX"`   // X坐标（判断是否在起始点）
	PositionY   string `json:"positionY"`   // Y坐标（判断是否在起始点）
	EquipmentNo string `json:"equipmentNo"` // 设备编号
}

type ExamPo struct {
	Id                      int            `json:"id" db:"id"` // 自增id
	TeamName                string         `json:"teamName" db:"team_name"`
	Topic                   string         `json:"topic" db:"topic"`
	BeginTime               time.Time      `json:"beginTime" db:"begin_time"`
	EndTime                 time.Time      `json:"endTime" db:"end_time"`
	ScoreOnline             float64        `json:"scoreOnline" db:"score_online"`
	ScoreOffline            float64        `json:"scoreOffline" db:"score_offline"`
	ScoreFinal              float64        `json:"scoreFinal" db:"score_final"`
	Details                 sql.NullString `json:"details" db:"details"`
	ScoreReportPath         string         `json:"ScoreReportPath" db:"score_report_path"`
	EquipmentNo             string         `json:"equipmentNo" db:"equipment_no"`
	DeductScoreOffline_1_1  int            `json:"deductScoreOffline_1_1" db:"deduct_score_offline_1_1"`
	DeductScoreOffline_1_2  int            `json:"deductScoreOffline_1_2" db:"deduct_score_offline_1_2"`
	DeductScoreOffline_1_3  int            `json:"deductScoreOffline_1_3" db:"deduct_score_offline_1_3"`
	DeductScoreOffline_1_4  int            `json:"deductScoreOffline_1_4" db:"deduct_score_offline_1_4"`
	DeductScoreOffline_2_1  int            `json:"deductScoreOffline_2_1" db:"deduct_score_offline_2_1"`
	DeductScoreOffline_2_2  int            `json:"deductScoreOffline_2_2" db:"deduct_score_offline_2_2"`
	DeductScoreOffline_3_1  int            `json:"deductScoreOffline_3_1" db:"deduct_score_offline_3_1"`
	DeductScoreOffline_3_2  int            `json:"deductScoreOffline_3_2" db:"deduct_score_offline_3_2"`
	DeductScoreOffline_3_3  int            `json:"deductScoreOffline_3_3" db:"deduct_score_offline_3_3"`
	DeductScoreOffline_3_4  int            `json:"deductScoreOffline_3_4" db:"deduct_score_offline_3_4"`
	DeductScoreOffline_4_1  int            `json:"deductScoreOffline_4_1" db:"deduct_score_offline_4_1"`
	DeductScoreOffline_4_2  int            `json:"deductScoreOffline_4_2" db:"deduct_score_offline_4_2"`
	DeductScoreOffline_4_3  int            `json:"deductScoreOffline_4_3" db:"deduct_score_offline_4_3"`
	DeductScoreOffline_5_1  int            `json:"deductScoreOffline_5_1" db:"deduct_score_offline_5_1"`
	DeductScoreOffline_5_2  int            `json:"deductScoreOffline_5_2" db:"deduct_score_offline_5_2"`
	DeductScoreOffline_5_3  int            `json:"deductScoreOffline_5_3" db:"deduct_score_offline_5_3"`
	DeductScoreOffline_6_1  int            `json:"deductScoreOffline_6_1" db:"deduct_score_offline_6_1"`
	DeductScoreOffline_6_2  int            `json:"deductScoreOffline_6_2" db:"deduct_score_offline_6_2"`
	DeductScoreOffline_7_1  int            `json:"deductScoreOffline_7_1" db:"deduct_score_offline_7_1"`
	DeductScoreOffline_7_2  int            `json:"deductScoreOffline_7_2" db:"deduct_score_offline_7_2"`
	DeductScoreOffline_7_3  int            `json:"deductScoreOffline_7_3" db:"deduct_score_offline_7_3"`
	DeductScoreOffline_8_1  int            `json:"deductScoreOffline_8_1" db:"deduct_score_offline_8_1"`
	DeductScoreOffline_8_2  int            `json:"deductScoreOffline_8_2" db:"deduct_score_offline_8_2"`
	DeductScoreOffline_8_3  int            `json:"deductScoreOffline_8_3" db:"deduct_score_offline_8_3"`
	DeductScoreOffline_9_1  int            `json:"deductScoreOffline_9_1" db:"deduct_score_offline_9_1"`
	DeductScoreOffline_9_2  int            `json:"deductScoreOffline_9_2" db:"deduct_score_offline_9_2"`
	DeductScoreOffline_9_3  int            `json:"deductScoreOffline_9_3" db:"deduct_score_offline_9_3"`
	DeductScoreOffline_10_1 int            `json:"deductScoreOffline_10_1" db:"deduct_score_offline_10_1"`
	DeductScoreOffline_10_2 int            `json:"deductScoreOffline_10_2" db:"deduct_score_offline_10_2"`
	DeductScoreOffline_11_1 int            `json:"deductScoreOffline_11_1" db:"deduct_score_offline_11_1"`
	DeductScoreOffline_11_2 int            `json:"deductScoreOffline_11_2" db:"deduct_score_offline_11_2"`
	DeductScoreOffline_12_1 int            `json:"deductScoreOffline_12_1" db:"deduct_score_offline_12_1"`
	DeductScoreOffline_12_2 int            `json:"deductScoreOffline_12_2" db:"deduct_score_offline_12_2"`
	DeductScoreOffline_12_3 int            `json:"deductScoreOffline_12_3" db:"deduct_score_offline_12_3"`
	DeductScoreOffline_13_1 int            `json:"deductScoreOffline_13_1" db:"deduct_score_offline_13_1"`
	DeductScoreOffline_13_2 int            `json:"deductScoreOffline_13_2" db:"deduct_score_offline_13_2"`
}

type ExamVo struct {
	Id                      int     `json:"id" ` // 自增id
	TeamName                string  `json:"teamName"`
	Topic                   string  `json:"topic" `
	BeginTime               string  `json:"beginTime" `
	EndTime                 string  `json:"endTime"`
	ScoreOnline             float64 `json:"scoreOnline" `
	ScoreOffline            float64 `json:"scoreOffline" `
	ScoreFinal              float64 `json:"scoreFinal"`
	Details                 string  `json:"details" `
	ScoreReportPath         string  `json:"ScoreReportPath" `
	DeductScoreOffline_1_1  int     `json:"deductScoreOffline_1_1" db:"deduct_score_offline_1_1"`
	DeductScoreOffline_1_2  int     `json:"deductScoreOffline_1_2" db:"deduct_score_offline_1_2"`
	DeductScoreOffline_1_3  int     `json:"deductScoreOffline_1_3" db:"deduct_score_offline_1_3"`
	DeductScoreOffline_1_4  int     `json:"deductScoreOffline_1_4" db:"deduct_score_offline_1_4"`
	DeductScoreOffline_2_1  int     `json:"deductScoreOffline_2_1" db:"deduct_score_offline_2_1"`
	DeductScoreOffline_2_2  int     `json:"deductScoreOffline_2_2" db:"deduct_score_offline_2_2"`
	DeductScoreOffline_3_1  int     `json:"deductScoreOffline_3_1" db:"deduct_score_offline_3_1"`
	DeductScoreOffline_3_2  int     `json:"deductScoreOffline_3_2" db:"deduct_score_offline_3_2"`
	DeductScoreOffline_3_3  int     `json:"deductScoreOffline_3_3" db:"deduct_score_offline_3_3"`
	DeductScoreOffline_3_4  int     `json:"deductScoreOffline_3_4" db:"deduct_score_offline_3_4"`
	DeductScoreOffline_4_1  int     `json:"deductScoreOffline_4_1" db:"deduct_score_offline_4_1"`
	DeductScoreOffline_4_2  int     `json:"deductScoreOffline_4_2" db:"deduct_score_offline_4_2"`
	DeductScoreOffline_4_3  int     `json:"deductScoreOffline_4_3" db:"deduct_score_offline_4_3"`
	DeductScoreOffline_5_1  int     `json:"deductScoreOffline_5_1" db:"deduct_score_offline_5_1"`
	DeductScoreOffline_5_2  int     `json:"deductScoreOffline_5_2" db:"deduct_score_offline_5_2"`
	DeductScoreOffline_5_3  int     `json:"deductScoreOffline_5_3" db:"deduct_score_offline_5_3"`
	DeductScoreOffline_6_1  int     `json:"deductScoreOffline_6_1" db:"deduct_score_offline_6_1"`
	DeductScoreOffline_6_2  int     `json:"deductScoreOffline_6_2" db:"deduct_score_offline_6_2"`
	DeductScoreOffline_7_1  int     `json:"deductScoreOffline_7_1" db:"deduct_score_offline_7_1"`
	DeductScoreOffline_7_2  int     `json:"deductScoreOffline_7_2" db:"deduct_score_offline_7_2"`
	DeductScoreOffline_7_3  int     `json:"deductScoreOffline_7_3" db:"deduct_score_offline_7_3"`
	DeductScoreOffline_8_1  int     `json:"deductScoreOffline_8_1" db:"deduct_score_offline_8_1"`
	DeductScoreOffline_8_2  int     `json:"deductScoreOffline_8_2" db:"deduct_score_offline_8_2"`
	DeductScoreOffline_8_3  int     `json:"deductScoreOffline_8_3" db:"deduct_score_offline_8_3"`
	DeductScoreOffline_9_1  int     `json:"deductScoreOffline_9_1" db:"deduct_score_offline_9_1"`
	DeductScoreOffline_9_2  int     `json:"deductScoreOffline_9_2" db:"deduct_score_offline_9_2"`
	DeductScoreOffline_9_3  int     `json:"deductScoreOffline_9_3" db:"deduct_score_offline_9_3"`
	DeductScoreOffline_10_1 int     `json:"deductScoreOffline_10_1" db:"deduct_score_offline_10_1"`
	DeductScoreOffline_10_2 int     `json:"deductScoreOffline_10_2" db:"deduct_score_offline_10_2"`
	DeductScoreOffline_11_1 int     `json:"deductScoreOffline_11_1" db:"deduct_score_offline_11_1"`
	DeductScoreOffline_11_2 int     `json:"deductScoreOffline_11_2" db:"deduct_score_offline_11_2"`
	DeductScoreOffline_12_1 int     `json:"deductScoreOffline_12_1" db:"deduct_score_offline_12_1"`
	DeductScoreOffline_12_2 int     `json:"deductScoreOffline_12_2" db:"deduct_score_offline_12_2"`
	DeductScoreOffline_12_3 int     `json:"deductScoreOffline_12_3" db:"deduct_score_offline_12_3"`
	DeductScoreOffline_13_1 int     `json:"deductScoreOffline_13_1" db:"deduct_score_offline_13_1"`
	DeductScoreOffline_13_2 int     `json:"deductScoreOffline_13_2" db:"deduct_score_offline_13_2"`
}

type ExamPagePao struct {
	CurrentPage int    `json:"currentPage"`
	PageSize    int    `json:"pageSize"`
	TeamName    string `json:"teamName"` // 队伍名字
	Topic       string `json:"topic"`    // 赛题
}
type ExamReportPao struct {
	Id          int    `json:"id"`
	TeamName    string `json:"teamName"`
	ScoreOnline int    `json:"scoreOnline"`
	BeginTime   string `json:"beginTime"`
	EndTime     string `json:"endTime"`
}

type ExamOfflinePao struct {
	Topic                   string `json:"topic"`
	TeamName                string `json:"teamName"`
	DeductScoreOffline_1_1  int    `json:"deductScoreOffline_1_1" db:"deduct_score_offline_1_1"`
	DeductScoreOffline_1_2  int    `json:"deductScoreOffline_1_2" db:"deduct_score_offline_1_2"`
	DeductScoreOffline_1_3  int    `json:"deductScoreOffline_1_3" db:"deduct_score_offline_1_3"`
	DeductScoreOffline_1_4  int    `json:"deductScoreOffline_1_4" db:"deduct_score_offline_1_4"`
	DeductScoreOffline_2_1  int    `json:"deductScoreOffline_2_1" db:"deduct_score_offline_2_1"`
	DeductScoreOffline_2_2  int    `json:"deductScoreOffline_2_2" db:"deduct_score_offline_2_2"`
	DeductScoreOffline_3_1  int    `json:"deductScoreOffline_3_1" db:"deduct_score_offline_3_1"`
	DeductScoreOffline_3_2  int    `json:"deductScoreOffline_3_2" db:"deduct_score_offline_3_2"`
	DeductScoreOffline_3_3  int    `json:"deductScoreOffline_3_3" db:"deduct_score_offline_3_3"`
	DeductScoreOffline_3_4  int    `json:"deductScoreOffline_3_4" db:"deduct_score_offline_3_4"`
	DeductScoreOffline_4_1  int    `json:"deductScoreOffline_4_1" db:"deduct_score_offline_4_1"`
	DeductScoreOffline_4_2  int    `json:"deductScoreOffline_4_2" db:"deduct_score_offline_4_2"`
	DeductScoreOffline_4_3  int    `json:"deductScoreOffline_4_3" db:"deduct_score_offline_4_3"`
	DeductScoreOffline_5_1  int    `json:"deductScoreOffline_5_1" db:"deduct_score_offline_5_1"`
	DeductScoreOffline_5_2  int    `json:"deductScoreOffline_5_2" db:"deduct_score_offline_5_2"`
	DeductScoreOffline_5_3  int    `json:"deductScoreOffline_5_3" db:"deduct_score_offline_5_3"`
	DeductScoreOffline_6_1  int    `json:"deductScoreOffline_6_1" db:"deduct_score_offline_6_1"`
	DeductScoreOffline_6_2  int    `json:"deductScoreOffline_6_2" db:"deduct_score_offline_6_2"`
	DeductScoreOffline_7_1  int    `json:"deductScoreOffline_7_1" db:"deduct_score_offline_7_1"`
	DeductScoreOffline_7_2  int    `json:"deductScoreOffline_7_2" db:"deduct_score_offline_7_2"`
	DeductScoreOffline_7_3  int    `json:"deductScoreOffline_7_3" db:"deduct_score_offline_7_3"`
	DeductScoreOffline_8_1  int    `json:"deductScoreOffline_8_1" db:"deduct_score_offline_8_1"`
	DeductScoreOffline_8_2  int    `json:"deductScoreOffline_8_2" db:"deduct_score_offline_8_2"`
	DeductScoreOffline_8_3  int    `json:"deductScoreOffline_8_3" db:"deduct_score_offline_8_3"`
	DeductScoreOffline_9_1  int    `json:"deductScoreOffline_9_1" db:"deduct_score_offline_9_1"`
	DeductScoreOffline_9_2  int    `json:"deductScoreOffline_9_2" db:"deduct_score_offline_9_2"`
	DeductScoreOffline_9_3  int    `json:"deductScoreOffline_9_3" db:"deduct_score_offline_9_3"`
	DeductScoreOffline_10_1 int    `json:"deductScoreOffline_10_1" db:"deduct_score_offline_10_1"`
	DeductScoreOffline_10_2 int    `json:"deductScoreOffline_10_2" db:"deduct_score_offline_10_2"`
	DeductScoreOffline_11_1 int    `json:"deductScoreOffline_11_1" db:"deduct_score_offline_11_1"`
	DeductScoreOffline_11_2 int    `json:"deductScoreOffline_11_2" db:"deduct_score_offline_11_2"`
	DeductScoreOffline_12_1 int    `json:"deductScoreOffline_12_1" db:"deduct_score_offline_12_1"`
	DeductScoreOffline_12_2 int    `json:"deductScoreOffline_12_2" db:"deduct_score_offline_12_2"`
	DeductScoreOffline_12_3 int    `json:"deductScoreOffline_12_3" db:"deduct_score_offline_12_3"`
	DeductScoreOffline_13_1 int    `json:"deductScoreOffline_13_1" db:"deduct_score_offline_13_1"`
	DeductScoreOffline_13_2 int    `json:"deductScoreOffline_13_2" db:"deduct_score_offline_13_2"`
}

/*
	{
	  "TotalScore": 10,
	  "SceneName": "在场景“路段-障碍物识别与响应",
	  "DeductedScore": 0,
	  "Reason": "",
	  "BeginTime": 1715389830.1170852,
	  "EndTime": 1715389842.4866548
	},
*/
type DetailsDto struct {
	TotalScore    float64 `json:"TotalScore"`
	SceneName     string  `json:"SceneName"`
	DeductedScore float64 `json:"DeductedScore"`
	Reason        string  `json:"Reason"`
	BeginTime     float64 `json:"BeginTime"`
	EndTime       float64 `json:"EndTime"`
}
