org_match_team_player.go 7.51 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 OrgMatchTeamPlayerGetPageReq struct {
haoyanbin's avatar
haoyanbin committed
11
	dto.Pagination `search:"-"`
haoyanbin's avatar
haoyanbin committed
12 13 14
	TeamId         string `form:"teamId"  search:"type:exact;column:team_id;table:org_match_team_player" comment:""`
	MatchId        string `form:"matchId"  search:"type:exact;column:match_id;table:org_match_team_player" comment:""`
	Rounds         string `form:"rounds"  search:"type:exact;column:rounds;table:org_match_team_player" comment:""`
haoyanbin's avatar
haoyanbin committed
15 16
}
type UpdateOrgMatchTeamPlayerReq struct {
haoyanbin's avatar
haoyanbin committed
17 18 19 20
	MatchId     string `json:"matchId"`
	Rounds      string `json:"rounds"`
	OtherTeamId string `json:"otherTeamId"`
	PlayersIds  string `json:"playersIds"`
haoyanbin's avatar
1  
haoyanbin committed
21 22
}

haoyanbin's avatar
haoyanbin committed
23 24 25 26 27
type OrgMatchTeamPlayerOrder struct {
	Id             int       `form:"idOrder"  search:"type:order;column:id;table:org_match_team_player"`
	MatchId        string    `form:"matchIdOrder"  search:"type:order;column:match_id;table:org_match_team_player"`
	ClubId         string    `form:"clubIdOrder"  search:"type:order;column:club_id;table:org_match_team_player"`
	TeamId         string    `form:"teamIdOrder"  search:"type:order;column:team_id;table:org_match_team_player"`
haoyanbin's avatar
haoyanbin committed
28
	PlayerId       string    `form:"playerIdOrder"  search:"type:order;column:player_id;table:org_match_team_player"`
haoyanbin's avatar
haoyanbin committed
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
	PlayerName     string    `form:"playerNameOrder"  search:"type:order;column:player_name;table:org_match_team_player"`
	PlayerNumber   string    `form:"playerNumberOrder"  search:"type:order;column:player_number;table:org_match_team_player"`
	Position       string    `form:"positionOrder"  search:"type:order;column:position;table:org_match_team_player"`
	Scoring        string    `form:"scoringOrder"  search:"type:order;column:scoring;table:org_match_team_player"`
	Rebound        string    `form:"reboundOrder"  search:"type:order;column:rebound;table:org_match_team_player"`
	Assist         string    `form:"assistOrder"  search:"type:order;column:assist;table:org_match_team_player"`
	Steal          string    `form:"stealOrder"  search:"type:order;column:steal;table:org_match_team_player"`
	FreeThrow      string    `form:"freeThrowOrder"  search:"type:order;column:free_throw;table:org_match_team_player"`
	BlockShot      string    `form:"blockShotOrder"  search:"type:order;column:block_shot;table:org_match_team_player"`
	Foul           string    `form:"foulOrder"  search:"type:order;column:foul;table:org_match_team_player"`
	TwoPointShot   string    `form:"twoPointShotOrder"  search:"type:order;column:two_point_shot;table:org_match_team_player"`
	ThreePointShot string    `form:"threePointShotOrder"  search:"type:order;column:three_point_shot;table:org_match_team_player"`
	CreateBy       string    `form:"createByOrder"  search:"type:order;column:create_by;table:org_match_team_player"`
	UpdateBy       string    `form:"updateByOrder"  search:"type:order;column:update_by;table:org_match_team_player"`
	CreatedAt      time.Time `form:"createdAtOrder"  search:"type:order;column:created_at;table:org_match_team_player"`
	UpdatedAt      time.Time `form:"updatedAtOrder"  search:"type:order;column:updated_at;table:org_match_team_player"`
	DeletedAt      time.Time `form:"deletedAtOrder"  search:"type:order;column:deleted_at;table:org_match_team_player"`
haoyanbin's avatar
1  
haoyanbin committed
46 47 48 49 50 51 52
}

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

type OrgMatchTeamPlayerInsertReq struct {
haoyanbin's avatar
haoyanbin committed
53 54
	Id             int    `json:"-" comment:""` //
	MatchId        string `json:"matchId" comment:""`
haoyanbin's avatar
haoyanbin committed
55
	Rounds         string `json:"rounds" comment:""`
haoyanbin's avatar
haoyanbin committed
56 57
	ClubId         string `json:"clubId" comment:""`
	TeamId         string `json:"teamId" comment:""`
haoyanbin's avatar
haoyanbin committed
58
	OtherTeamId    string `json:"otherTeamId" comment:""`
haoyanbin's avatar
haoyanbin committed
59
	PlayerId       string `json:"playerId" comment:""`
haoyanbin's avatar
haoyanbin committed
60 61 62 63 64 65 66 67 68 69 70 71 72
	PlayerName     string `json:"playerName" comment:"球员名称"`
	PlayerNumber   string `json:"playerNumber" comment:"球员号码"`
	Position       string `json:"position" comment:"场上位置"`
	Scoring        string `json:"scoring" comment:"得分"`
	Rebound        string `json:"rebound" comment:"篮板"`
	Assist         string `json:"assist" comment:"助攻"`
	Steal          string `json:"steal" comment:"抢断"`
	FreeThrow      string `json:"freeThrow" comment:"罚球"`
	BlockShot      string `json:"blockShot" comment:"盖帽"`
	Foul           string `json:"foul" comment:"犯规"`
	TwoPointShot   string `json:"twoPointShot" comment:"2分进球数量"`
	ThreePointShot string `json:"threePointShot" comment:"3分进球数量"`
	common.ControlBy
haoyanbin's avatar
1  
haoyanbin committed
73 74
}

haoyanbin's avatar
haoyanbin committed
75 76 77 78 79
func (s *OrgMatchTeamPlayerInsertReq) Generate(model *models.OrgMatchTeamPlayer) {
	if s.Id == 0 {
		model.Model = common.Model{Id: s.Id}
	}
	model.MatchId = s.MatchId
haoyanbin's avatar
haoyanbin committed
80
	model.Rounds = s.Rounds
haoyanbin's avatar
haoyanbin committed
81 82
	model.ClubId = s.ClubId
	model.TeamId = s.TeamId
haoyanbin's avatar
haoyanbin committed
83
	model.OtherTeamId = s.OtherTeamId
haoyanbin's avatar
haoyanbin committed
84
	model.PlayerId = s.PlayerId
haoyanbin's avatar
haoyanbin committed
85 86 87 88 89 90 91 92 93 94 95 96
	model.PlayerName = s.PlayerName
	model.PlayerNumber = s.PlayerNumber
	model.Position = s.Position
	model.Scoring = s.Scoring
	model.Rebound = s.Rebound
	model.Assist = s.Assist
	model.Steal = s.Steal
	model.FreeThrow = s.FreeThrow
	model.BlockShot = s.BlockShot
	model.Foul = s.Foul
	model.TwoPointShot = s.TwoPointShot
	model.ThreePointShot = s.ThreePointShot
haoyanbin's avatar
1  
haoyanbin committed
97 98 99 100 101 102 103
}

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

type OrgMatchTeamPlayerUpdateReq struct {
haoyanbin's avatar
haoyanbin committed
104 105
	Id             int    `uri:"id" comment:""` //
	MatchId        string `json:"matchId" comment:""`
haoyanbin's avatar
haoyanbin committed
106
	Rounds         string `json:"rounds" comment:""`
haoyanbin's avatar
haoyanbin committed
107 108
	ClubId         string `json:"clubId" comment:""`
	TeamId         string `json:"teamId" comment:""`
haoyanbin's avatar
haoyanbin committed
109
	OtherTeamId    string `json:"otherTeamId" comment:""`
haoyanbin's avatar
haoyanbin committed
110
	PlayerId       string `json:"playerId" comment:""`
haoyanbin's avatar
haoyanbin committed
111 112 113 114 115 116 117 118 119 120 121 122 123
	PlayerName     string `json:"playerName" comment:"球员名称"`
	PlayerNumber   string `json:"playerNumber" comment:"球员号码"`
	Position       string `json:"position" comment:"场上位置"`
	Scoring        string `json:"scoring" comment:"得分"`
	Rebound        string `json:"rebound" comment:"篮板"`
	Assist         string `json:"assist" comment:"助攻"`
	Steal          string `json:"steal" comment:"抢断"`
	FreeThrow      string `json:"freeThrow" comment:"罚球"`
	BlockShot      string `json:"blockShot" comment:"盖帽"`
	Foul           string `json:"foul" comment:"犯规"`
	TwoPointShot   string `json:"twoPointShot" comment:"2分进球数量"`
	ThreePointShot string `json:"threePointShot" comment:"3分进球数量"`
	common.ControlBy
haoyanbin's avatar
1  
haoyanbin committed
124 125
}

haoyanbin's avatar
haoyanbin committed
126 127 128 129 130
func (s *OrgMatchTeamPlayerUpdateReq) Generate(model *models.OrgMatchTeamPlayer) {
	if s.Id == 0 {
		model.Model = common.Model{Id: s.Id}
	}
	model.MatchId = s.MatchId
haoyanbin's avatar
haoyanbin committed
131
	model.Rounds = s.Rounds
haoyanbin's avatar
haoyanbin committed
132 133
	model.ClubId = s.ClubId
	model.TeamId = s.TeamId
haoyanbin's avatar
haoyanbin committed
134
	model.OtherTeamId = s.OtherTeamId
haoyanbin's avatar
haoyanbin committed
135
	model.PlayerId = s.PlayerId
haoyanbin's avatar
haoyanbin committed
136 137 138 139 140 141 142 143 144 145 146 147
	model.PlayerName = s.PlayerName
	model.PlayerNumber = s.PlayerNumber
	model.Position = s.Position
	model.Scoring = s.Scoring
	model.Rebound = s.Rebound
	model.Assist = s.Assist
	model.Steal = s.Steal
	model.FreeThrow = s.FreeThrow
	model.BlockShot = s.BlockShot
	model.Foul = s.Foul
	model.TwoPointShot = s.TwoPointShot
	model.ThreePointShot = s.ThreePointShot
haoyanbin's avatar
1  
haoyanbin committed
148 149 150 151 152 153 154 155
}

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

// OrgMatchTeamPlayerGetReq 功能获取请求参数
type OrgMatchTeamPlayerGetReq struct {
haoyanbin's avatar
haoyanbin committed
156
	Id int `uri:"id"`
haoyanbin's avatar
1  
haoyanbin committed
157
}
haoyanbin's avatar
haoyanbin committed
158

haoyanbin's avatar
1  
haoyanbin committed
159 160 161 162 163 164
func (s *OrgMatchTeamPlayerGetReq) GetId() interface{} {
	return s.Id
}

// OrgMatchTeamPlayerDeleteReq 功能删除请求参数
type OrgMatchTeamPlayerDeleteReq struct {
haoyanbin's avatar
haoyanbin committed
165 166 167 168
	MatchId string `json:"matchId"`
	Rounds  string `json:"rounds"`
	TeamId  string `json:"teamId"`
	Ids     string `json:"ids"`
haoyanbin's avatar
1  
haoyanbin committed
169 170 171 172
}

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