org_match_evaluate.go 6.93 KB
Newer Older
haoyanbin's avatar
1  
haoyanbin committed
1 2 3
package dto

import (
haoyanbin's avatar
1  
haoyanbin committed
4
	"go-admin/app/operate/models"
haoyanbin's avatar
1  
haoyanbin committed
5 6 7 8 9 10
	"go-admin/common/dto"
	common "go-admin/common/models"
	"time"
)

type OrgMatchEvaluateGetPageReq struct {
haoyanbin's avatar
haoyanbin committed
11
	dto.Pagination `search:"-"`
haoyanbin's avatar
haoyanbin committed
12
	TeamId         string `form:"teamId"  search:"-"`                                                                                 //联赛级别id
haoyanbin's avatar
haoyanbin committed
13 14 15 16 17
	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:"球员名称"`                    //球员名称
haoyanbin's avatar
1  
haoyanbin committed
18
	ContentStatus  string `form:"contentStatus"  search:"type:exact;column:content_status;table:ome" comment:"教练评价状态 1 待评价 2 评价完成"`   //教练评价状态 1 待评价 2 评价完成
haoyanbin's avatar
haoyanbin committed
19 20
	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 发布完成
haoyanbin's avatar
1  
haoyanbin committed
21 22
}

haoyanbin's avatar
haoyanbin committed
23 24 25 26 27 28 29
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"`
haoyanbin's avatar
1  
haoyanbin committed
30 31
	MatchStartTime time.Time `json:"matchStartTimeOrder"`
	MatchEndTime   time.Time `json:"matchEndTimeOrder"`
haoyanbin's avatar
1  
haoyanbin committed
32
	ContentStatus  string    `json:"contentStatus"`
haoyanbin's avatar
1  
haoyanbin committed
33 34 35 36 37 38 39 40 41 42 43
	MvStatus       string    `json:"mvStatus"`
	Status         string    `json:"status"`
}

type GetPageMatchReq struct {
	Id string `form:"id" json:"id"`
}
type GetPageMatchReply struct {
	MatchInfo     dto.PageMatchInfo   `json:"matchInfo"`
	TotalScoring  []dto.TotalScoring  `json:"totalScoring"`
	RoundsScoring []dto.RoundsScoring `json:"roundsScoring"`
haoyanbin's avatar
haoyanbin committed
44 45
}

haoyanbin's avatar
1  
haoyanbin committed
46 47 48 49 50
func (m *OrgMatchEvaluateGetPageReq) GetNeedSearch() interface{} {
	return *m
}

type OrgMatchEvaluateInsertReq struct {
haoyanbin's avatar
haoyanbin committed
51
	Id                      int    `json:"-" comment:""` //
haoyanbin's avatar
haoyanbin committed
52
	MatchId                 string `json:"matchId" comment:""`
haoyanbin's avatar
haoyanbin committed
53 54 55 56
	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:"教练评价内容"`
haoyanbin's avatar
1  
haoyanbin committed
57
	ContentStatus           string `json:"contentStatus" comment:"教练评价状态 1 待评价 2 评价完成"`
haoyanbin's avatar
haoyanbin committed
58 59 60 61 62 63 64 65
	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
haoyanbin's avatar
1  
haoyanbin committed
66 67
}

haoyanbin's avatar
haoyanbin committed
68 69 70 71
func (s *OrgMatchEvaluateInsertReq) Generate(model *models.OrgMatchEvaluate) {
	if s.Id == 0 {
		model.Model = common.Model{Id: s.Id}
	}
haoyanbin's avatar
haoyanbin committed
72
	model.MatchId = s.MatchId
haoyanbin's avatar
haoyanbin committed
73 74 75 76 77 78 79 80 81 82 83
	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
haoyanbin's avatar
1  
haoyanbin committed
84 85 86 87 88 89 90
}

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

type OrgMatchEvaluateUpdateReq struct {
haoyanbin's avatar
haoyanbin committed
91
	Id                      int    `uri:"id" comment:""` //
haoyanbin's avatar
haoyanbin committed
92
	MatchId                 string `json:"matchId" comment:""`
haoyanbin's avatar
haoyanbin committed
93 94 95 96
	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:"教练评价内容"`
haoyanbin's avatar
1  
haoyanbin committed
97
	ContentStatus           string `json:"contentStatus" comment:"教练评价状态 1 待评价 2 评价完成"`
haoyanbin's avatar
haoyanbin committed
98 99 100 101 102 103 104 105
	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
haoyanbin's avatar
1  
haoyanbin committed
106 107
}

haoyanbin's avatar
haoyanbin committed
108 109 110 111
func (s *OrgMatchEvaluateUpdateReq) Generate(model *models.OrgMatchEvaluate) {
	if s.Id == 0 {
		model.Model = common.Model{Id: s.Id}
	}
haoyanbin's avatar
haoyanbin committed
112
	model.MatchId = s.MatchId
haoyanbin's avatar
haoyanbin committed
113 114 115 116
	model.Rounds = s.Rounds
	model.TeamUserId = s.TeamUserId
	model.PlayerId = s.PlayerId
	model.Content = s.Content
haoyanbin's avatar
1  
haoyanbin committed
117
	model.ContentStatus = s.ContentStatus
haoyanbin's avatar
haoyanbin committed
118 119 120 121 122 123 124
	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
haoyanbin's avatar
1  
haoyanbin committed
125 126 127 128 129 130 131 132
}

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

// OrgMatchEvaluateGetReq 功能获取请求参数
type OrgMatchEvaluateGetReq struct {
haoyanbin's avatar
haoyanbin committed
133
	Id int `uri:"id"`
haoyanbin's avatar
1  
haoyanbin committed
134
}
haoyanbin's avatar
haoyanbin committed
135

haoyanbin's avatar
haoyanbin committed
136 137 138 139 140
type OrgMatchEvaluateGetReply struct {
	MatchInfo     dto.PageMatchInfo   `json:"matchInfo"`
	RoundsScoring []dto.RoundsScoring `json:"roundsScoring"`
}

haoyanbin's avatar
1  
haoyanbin committed
141 142 143 144 145 146 147 148 149 150 151
func (s *OrgMatchEvaluateGetReq) GetId() interface{} {
	return s.Id
}

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

func (s *OrgMatchEvaluateDeleteReq) GetId() interface{} {
	return s.Ids
haoyanbin's avatar
haoyanbin committed
152
}