org_match_team.go 3.15 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 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
	"go-admin/common/dto"
	common "go-admin/common/models"
	"time"
)

type OrgMatchTeamGetPageReq struct {
	dto.Pagination     `search:"-"`
    OrgMatchTeamOrder
}

type OrgMatchTeamOrder struct {Id int `form:"idOrder"  search:"type:order;column:id;table:org_match_team"`
    MatchId string `form:"matchIdOrder"  search:"type:order;column:match_id;table:org_match_team"`
    ClubId string `form:"clubIdOrder"  search:"type:order;column:club_id;table:org_match_team"`
    TeamId string `form:"teamIdOrder"  search:"type:order;column:team_id;table:org_match_team"`
    MatchScore string `form:"matchScoreOrder"  search:"type:order;column:match_score;table:org_match_team"`
    Integral string `form:"integralOrder"  search:"type:order;column:integral;table:org_match_team"`
    CreateBy string `form:"createByOrder"  search:"type:order;column:create_by;table:org_match_team"`
    UpdateBy string `form:"updateByOrder"  search:"type:order;column:update_by;table:org_match_team"`
    CreatedAt time.Time `form:"createdAtOrder"  search:"type:order;column:created_at;table:org_match_team"`
    UpdatedAt time.Time `form:"updatedAtOrder"  search:"type:order;column:updated_at;table:org_match_team"`
    DeletedAt time.Time `form:"deletedAtOrder"  search:"type:order;column:deleted_at;table:org_match_team"`
    
}

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

type OrgMatchTeamInsertReq struct {
    Id int `json:"-" comment:""` // 
    MatchId string `json:"matchId" comment:""`
    ClubId string `json:"clubId" comment:""`
    TeamId string `json:"teamId" comment:""`
    MatchScore string `json:"matchScore" comment:"比分"`
    Integral string `json:"integral" comment:"积分"`
    common.ControlBy
}

func (s *OrgMatchTeamInsertReq) Generate(model *models.OrgMatchTeam)  {
    if s.Id == 0 {
        model.Model = common.Model{ Id: s.Id }
    }
    model.MatchId = s.MatchId
    model.ClubId = s.ClubId
    model.TeamId = s.TeamId
    model.MatchScore = s.MatchScore
    model.Integral = s.Integral
}

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

type OrgMatchTeamUpdateReq struct {
    Id int `uri:"id" comment:""` // 
    MatchId string `json:"matchId" comment:""`
    ClubId string `json:"clubId" comment:""`
    TeamId string `json:"teamId" comment:""`
    MatchScore string `json:"matchScore" comment:"比分"`
    Integral string `json:"integral" comment:"积分"`
    common.ControlBy
}

func (s *OrgMatchTeamUpdateReq) Generate(model *models.OrgMatchTeam)  {
    if s.Id == 0 {
        model.Model = common.Model{ Id: s.Id }
    }
    model.MatchId = s.MatchId
    model.ClubId = s.ClubId
    model.TeamId = s.TeamId
    model.MatchScore = s.MatchScore
    model.Integral = s.Integral
}

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

// OrgMatchTeamGetReq 功能获取请求参数
type OrgMatchTeamGetReq struct {
     Id int `uri:"id"`
}
func (s *OrgMatchTeamGetReq) GetId() interface{} {
	return s.Id
}

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

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