org_team.go 2.28 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
	"go-admin/common/dto"
	common "go-admin/common/models"
	"time"
)

type OrgTeamGetPageReq struct {
	dto.Pagination     `search:"-"`
    OrgTeamOrder
}

type OrgTeamOrder struct {Id int `form:"idOrder"  search:"type:order;column:id;table:org_team"`
    ClubId string `form:"clubIdOrder"  search:"type:order;column:club_id;table:org_team"`
    TeamName string `form:"teamNameOrder"  search:"type:order;column:team_name;table:org_team"`
    CreateBy string `form:"createByOrder"  search:"type:order;column:create_by;table:org_team"`
    UpdateBy string `form:"updateByOrder"  search:"type:order;column:update_by;table:org_team"`
    CreatedAt time.Time `form:"createdAtOrder"  search:"type:order;column:created_at;table:org_team"`
    UpdatedAt time.Time `form:"updatedAtOrder"  search:"type:order;column:updated_at;table:org_team"`
    DeletedAt time.Time `form:"deletedAtOrder"  search:"type:order;column:deleted_at;table:org_team"`
    
}

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

type OrgTeamInsertReq struct {
    Id int `json:"-" comment:""` // 
    ClubId string `json:"clubId" comment:"org_club表id"`
    TeamName string `json:"teamName" comment:"球队名称"`
    common.ControlBy
}

func (s *OrgTeamInsertReq) Generate(model *models.OrgTeam)  {
    if s.Id == 0 {
        model.Model = common.Model{ Id: s.Id }
    }
    model.ClubId = s.ClubId
    model.TeamName = s.TeamName
}

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

type OrgTeamUpdateReq struct {
    Id int `uri:"id" comment:""` // 
    ClubId string `json:"clubId" comment:"org_club表id"`
    TeamName string `json:"teamName" comment:"球队名称"`
    common.ControlBy
}

func (s *OrgTeamUpdateReq) Generate(model *models.OrgTeam)  {
    if s.Id == 0 {
        model.Model = common.Model{ Id: s.Id }
    }
    model.ClubId = s.ClubId
    model.TeamName = s.TeamName
}

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

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

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

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