org_team_user.go 4.14 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
	"go-admin/common/dto"
	common "go-admin/common/models"
)

type OrgTeamUserGetPageReq struct {
haoyanbin's avatar
1  
haoyanbin committed
10
	dto.Pagination `search:"-"`
haoyanbin's avatar
1  
haoyanbin committed
11
	ClubId         string `form:"clubId"  search:"-"`                                                        //球队名称
haoyanbin's avatar
1  
haoyanbin committed
12 13
	TeamName       string `form:"teamName"  search:"type:contains;column:team_name;table:ot" comment:"球队名称"` //球队名称
	Name           string `form:"name"  search:"type:contains;column:name;table:otu" comment:"姓名"`           //姓名
haoyanbin's avatar
haoyanbin committed
14
	Status         string `form:"status"  search:"type:exact;column:status;table:su" comment:"状态"`           //状态 1 离职 2 在职
haoyanbin's avatar
1  
haoyanbin committed
15 16
}

haoyanbin's avatar
1  
haoyanbin committed
17 18 19 20 21 22 23 24
type OrgTeamUserGetPageReply struct {
	Id       string `json:"id"`
	ClubName string `json:"clubName"`
	TeamName string `json:"teamName"`
	Name     string `json:"name"`
	Sex      string `json:"sex"`
	RoleName string `json:"roleName"`
	Status   string `json:"status"`
haoyanbin's avatar
1  
haoyanbin committed
25 26 27 28 29 30 31
}

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

type OrgTeamUserInsertReq struct {
haoyanbin's avatar
1  
haoyanbin committed
32 33 34 35 36 37 38 39 40 41
	Id       int    `json:"-" comment:""` //
	ClubId   string `json:"clubId" comment:"org_club表id"`
	TeamId   string `json:"teamId" comment:"org_team表id"`
	RoleId   string `json:"roleId" comment:"角色id"`
	UserId   string `json:"userId" comment:"用户id"`
	Name     string `json:"name" comment:"姓名"`
	NameEn   string `json:"name_en" comment:"姓名"`
	Sex      string `json:"sex" comment:"性别"`
	UserImg  string `json:"userImg" comment:"用户照片"`
	SignImg  string `json:"signImg" comment:"签名照片"`
haoyanbin's avatar
haoyanbin committed
42
	Username string `json:"username" comment:"账号"`
haoyanbin's avatar
1  
haoyanbin committed
43
	common.ControlBy
haoyanbin's avatar
1  
haoyanbin committed
44 45
}

haoyanbin's avatar
1  
haoyanbin committed
46 47 48 49 50 51 52 53 54 55 56
func (s *OrgTeamUserInsertReq) Generate(model *models.OrgTeamUser) {
	if s.Id == 0 {
		model.Model = common.Model{Id: s.Id}
	}
	model.ClubId = s.ClubId
	model.TeamId = s.TeamId
	model.UserId = s.UserId
	model.Name = s.Name
	model.Sex = s.Sex
	model.UserImg = s.UserImg
	model.SignImg = s.SignImg
haoyanbin's avatar
1  
haoyanbin committed
57 58 59 60 61 62 63
}

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

type OrgTeamUserUpdateReq struct {
haoyanbin's avatar
haoyanbin committed
64 65 66 67 68 69 70 71 72 73 74
	Id       int    `uri:"id" comment:""` //
	ClubId   string `json:"clubId" comment:"org_club表id"`
	TeamId   string `json:"teamId" comment:"org_team表id"`
	RoleId   string `json:"roleId" comment:"角色id"`
	UserId   string `json:"userId" comment:"sys_user表id"`
	Name     string `json:"name" comment:"姓名"`
	NameEn   string `json:"name_en" comment:"姓名"`
	Sex      string `json:"sex" comment:"性别"`
	UserImg  string `json:"userImg" comment:"用户照片"`
	SignImg  string `json:"signImg" comment:"签名照片"`
	UserName string `json:"userName" comment:"账号"`
haoyanbin's avatar
haoyanbin committed
75
	Status   string `json:"status" comment:"状态 1 离职 2 在职" default:"2"` //状态 1 离职 2 在职
haoyanbin's avatar
haoyanbin committed
76 77 78 79 80 81
	common.ControlBy
}

type OrgTeamUserUpdateStatusReq struct {
	Id     int    `json:"id" comment:""`                 //
	Status string `json:"status" comment:"状态 1 离职 2 在职"` //状态 1 离职 2 在职
haoyanbin's avatar
1  
haoyanbin committed
82
	common.ControlBy
haoyanbin's avatar
1  
haoyanbin committed
83 84
}

haoyanbin's avatar
1  
haoyanbin committed
85 86 87 88 89 90 91 92 93 94 95
func (s *OrgTeamUserUpdateReq) Generate(model *models.OrgTeamUser) {
	if s.Id == 0 {
		model.Model = common.Model{Id: s.Id}
	}
	model.ClubId = s.ClubId
	model.TeamId = s.TeamId
	model.UserId = s.UserId
	model.Name = s.Name
	model.Sex = s.Sex
	model.UserImg = s.UserImg
	model.SignImg = s.SignImg
haoyanbin's avatar
1  
haoyanbin committed
96 97 98 99 100 101
}

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

haoyanbin's avatar
1  
haoyanbin committed
102 103 104 105
type OrgTeamUserGetForUserId struct {
	UserId int `json:"userId"`
}

haoyanbin's avatar
1  
haoyanbin committed
106 107
// OrgTeamUserGetReq 功能获取请求参数
type OrgTeamUserGetReq struct {
haoyanbin's avatar
1  
haoyanbin committed
108
	Id int `uri:"id"`
haoyanbin's avatar
1  
haoyanbin committed
109
}
haoyanbin's avatar
1  
haoyanbin committed
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125

type OrgTeamUserGetReply struct {
	Id       string `json:"id"`
	ClubName string `json:"clubName"`
	TeamId   string `json:"teamId"`
	TeamName string `json:"teamName"`
	Name     string `json:"name"`
	Sex      string `json:"sex"`
	UserImg  string `json:"userImg" comment:"用户照片"`
	SignImg  string `json:"signImg" comment:"签名照片"`
	RoleId   string `json:"roleId"`
	RoleName string `json:"roleName"`
	Username string `json:"username"`
	Status   string `json:"status"`
}

haoyanbin's avatar
1  
haoyanbin committed
126 127 128 129 130 131 132 133 134 135 136
func (s *OrgTeamUserGetReq) GetId() interface{} {
	return s.Id
}

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

func (s *OrgTeamUserDeleteReq) GetId() interface{} {
	return s.Ids
haoyanbin's avatar
1  
haoyanbin committed
137
}