org_match_evaluate.go 6.45 KB
package dto

import (
	"go-admin/app/operate/models"
	"go-admin/common/dto"
	common "go-admin/common/models"
	"time"
)

type OrgMatchEvaluateGetPageReq struct {
	dto.Pagination `search:"-"`
	TeamId         string `form:"teamId"  search:"-"`                                                                                 //联赛级别id
	LeagueId       string `form:"leagueId"  search:"type:exact;column:league_id;table:om" comment:"联赛级别id"`                           //联赛级别id
	DivisionId     string `form:"divisionId"  search:"type:exact;column:division_id;table:om" comment:"赛区id"`                         //赛区id
	SeasonId       string `form:"seasonId"  search:"type:exact;column:season_id;table:om" comment:"赛季id"`                             //赛季id
	Rounds         string `form:"rounds"  search:"type:exact;column:rounds;table:omtp" comment:"轮次"`                                  //轮次
	PlayerName     string `form:"playerName"  search:"type:contains;column:player_name;table:omtp" comment:"球员名称"`                    //球员名称
	ContentStatus  string `form:"contentStatus"  search:"type:exact;column:content_status;table:ome" comment:"教练评价状态 1 待评价 2 评价完成"`   //教练评价状态 1 待评价 2 评价完成
	MvStatus       string `form:"mvStatus"  search:"type:exact;column:mv_status;table:ome" comment:"视频维护状态 1 待维护 2 维护完成 3 驳回 4 维护完成"` //视频维护状态 1 待维护 2 维护完成 3 驳回 4 维护完成
	Status         string `form:"status"  search:"type:exact;column:status;table:ome" comment:"发布状态 0 保存 1 待审核 3 驳回 4 发布完成"`          //发布状态 0 保存 1 待审核 3 驳回 4 发布完成
}

type OrgMatchEvaluateGetPageReply struct {
	Id             string    `json:"id"`
	LeagueName     string    `json:"leagueName"`
	DivisionName   string    `json:"divisionName"`
	SeasonName     string    `json:"seasonName"`
	Rounds         string    `json:"rounds"`
	PlayerName     string    `json:"playerName"`
	MatchStartTime time.Time `json:"matchStartTimeOrder"`
	MatchEndTime   time.Time `json:"matchEndTimeOrder"`
	ContentStatus  string    `json:"contentStatus"`
	MvStatus       string    `json:"mvStatus"`
	Status         string    `json:"status"`
}

type GetPageMatchReq struct {
	Id int `form:"id" json:"id"`
}
type GetPageMatchReply struct {
	MatchInfo     dto.PageMatchInfo   `json:"matchInfo"`
	MatchImg      []dto.Wonderful     `json:"matchImg"`
	MatchMv       []dto.Wonderful     `json:"matchMv"`
	TotalScoring  []dto.TotalScoring  `json:"totalScoring"`
	RoundsScoring []dto.RoundsScoring `json:"roundsScoring"`
}

func (m *OrgMatchEvaluateGetPageReq) GetNeedSearch() interface{} {
	return *m
}

type OrgMatchEvaluateInsertReq struct {
	Id                      int    `json:"-" comment:""` //
	MatchId                 string `json:"matchId" comment:""`
	Rounds                  string `json:"rounds" comment:""`
	TeamUserId              string `json:"teamUserId" comment:"org_team_user表id(教练id)"`
	PlayerId                string `json:"playerId" comment:"org_player表id(球员id)"`
	Content                 string `json:"content" comment:"教练评价内容"`
	ContentStatus           string `json:"contentStatus" comment:"教练评价状态 1 待评价 2 评价完成"`
	WonderfulMomentImg      string `json:"wonderfulMomentImg" comment:"精彩时刻图"`
	WonderfulMomentMv       string `json:"wonderfulMomentMv" comment:"精彩时刻视频"`
	WonderfulMomentImgTitle string `json:"wonderfulMomentImgTitle" comment:"精彩时刻图标题"`
	WonderfulMomentMvTitle  string `json:"wonderfulMomentMvTitle" comment:"精彩时刻视频标题"`
	MvStatus                string `json:"mvStatus" comment:"视频维护状态 1 待维护 2 维护完成 3 驳回 4 维护完成"`
	Status                  string `json:"status" comment:"发布状态 1 待审核 3 驳回 4 发布完成"`
	Remark                  string `json:"remark" comment:"驳回原因"`
	common.ControlBy
}

func (s *OrgMatchEvaluateInsertReq) Generate(model *models.OrgMatchEvaluate) {
	if s.Id == 0 {
		model.Model = common.Model{Id: s.Id}
	}
	model.MatchId = s.MatchId
	model.Rounds = s.Rounds
	model.TeamUserId = s.TeamUserId
	model.PlayerId = s.PlayerId
	model.Content = s.Content
	model.WonderfulMomentImg = s.WonderfulMomentImg
	model.WonderfulMomentMv = s.WonderfulMomentMv
	model.WonderfulMomentImgTitle = s.WonderfulMomentImgTitle
	model.WonderfulMomentMvTitle = s.WonderfulMomentMvTitle
	model.MvStatus = s.MvStatus
	model.Status = s.Status
	model.Remark = s.Remark
}

func (s *OrgMatchEvaluateInsertReq) GetId() interface{} {
	return s.Id
}

type OrgMatchEvaluateUpdateReq struct {
	Id            int    `uri:"id" comment:""` //
	MatchId       string `json:"matchId" comment:""`
	Rounds        string `json:"rounds" comment:""`
	TeamUserId    string `json:"teamUserId" comment:"org_team_user表id(教练id)"`
	PlayerId      string `json:"playerId" comment:"org_player表id(球员id)"`
	Content       string `json:"content" comment:"教练评价内容"`
	ContentStatus string `json:"contentStatus" comment:"教练评价状态 1 待评价 2 评价完成"`
	MvStatus      string `json:"mvStatus" comment:"视频维护状态 1 待维护 2 维护完成 3 驳回 4 维护完成"`
	Status        string `json:"status" comment:"发布状态 1 待审核 3 驳回 4 发布完成"`
	Remark        string `json:"remark" comment:"驳回原因"`
	common.ControlBy
	MatchImg []dto.Wonderful `json:"matchImg"`
	MatchMv  []dto.Wonderful `json:"matchMv"`
}

func (s *OrgMatchEvaluateUpdateReq) Generate(model *models.OrgMatchEvaluate) {
	if s.Id == 0 {
		model.Model = common.Model{Id: s.Id}
	}
	model.MatchId = s.MatchId
	model.Rounds = s.Rounds
	model.TeamUserId = s.TeamUserId
	model.PlayerId = s.PlayerId
	model.Content = s.Content
	model.ContentStatus = s.ContentStatus
	model.MvStatus = s.MvStatus
	model.Status = s.Status
	model.Remark = s.Remark
}

func (s *OrgMatchEvaluateUpdateReq) GetId() interface{} {
	return s.Id
}

// OrgMatchEvaluateGetReq 功能获取请求参数
type OrgMatchEvaluateGetReq struct {
	Id int `uri:"id"`
}

type OrgMatchEvaluateGetReply struct {
	MatchInfo     dto.PageMatchInfo   `json:"matchInfo"`
	RoundsScoring []dto.RoundsScoring `json:"roundsScoring"`
}

func (s *OrgMatchEvaluateGetReq) GetId() interface{} {
	return s.Id
}

// OrgMatchEvaluateDeleteReq 功能删除请求参数
type OrgMatchEvaluateDeleteReq struct {
	Ids []int `json:"ids"`
}

func (s *OrgMatchEvaluateDeleteReq) GetId() interface{} {
	return s.Ids
}