package request

// PageInfo Paging common input parameter structure
type PageInfo struct {
	Page     int    `json:"page" form:"page"`         // 页码
	PageSize int    `json:"pageSize" form:"pageSize"` // 每页大小
	Keyword  string `json:"keyword" form:"keyword"`   //关键字
}

// GetById Find by id structure
type GetById struct {
	ID int `json:"id" form:"id"` // 主键ID
}

func (r *GetById) Uint() uint {
	return uint(r.ID)
}

type IdsReq struct {
	Ids []int `json:"ids" form:"ids"`
}

// GetAuthorityId Get role by id structure
type GetAuthorityId struct {
	AuthorityId uint `json:"authorityId" form:"authorityId"` // 角色ID
}

type Ids struct {
	Ids []int `json:"ids" form:"ids"`
	Id  int   `json:"id" form:"id"`
}

type SearchProject struct {
	PageInfo PageInfo `json:"pageInfo" form:"pageInfo"`
	Name     string   `json:"name" form:"name"`
	Time     string   `json:"time" form:"time"`
	State    int      `json:"state" form:"state"`
}

type SearchWorkingHours struct {
	PageInfo PageInfo `json:"pageInfo" form:"pageInfo"`
	Code     string   `json:"code" form:"code"`
	Time     string   `json:"time" form:"time"`
	YearTime string   `json:"yearTime" form:"yearTime"`
	People   int      `json:"people" form:"people"`
}

type SearchDailyFee struct {
	PageInfo PageInfo `json:"pageInfo" form:"pageInfo"`
	Name     string   `json:"name" form:"name"`
	Time     string   `json:"time" form:"time"`
	YearTime string   `json:"yearTime" form:"yearTime"`
	Genre    int      `json:"genre" form:"genre"`
}

type SearchNameTime struct {
	PageInfo PageInfo `json:"pageInfo" form:"pageInfo"`
	Name     string   `json:"name" form:"name"`
	Time     string   `json:"time" form:"time"`
	YearTime string   `json:"yearTime" form:"yearTime"`
}

type SearchExpenses struct {
	PageInfo    PageInfo `json:"pageInfo" form:"pageInfo"`
	Reimburser  int      `json:"reimburser" form:"reimburser"`
	ProjectCode string   `json:"projectCode" form:"projectCode"`
	Genre       int      `json:"genre" form:"genre"`
	DayTime     string   `json:"dayTime" form:"dayTime"`
	MonthTime   string   `json:"monthTime" form:"monthTime"`
	YearTime    string   `json:"yearTime" form:"yearTime"`
}

type SearchProjectList struct {
	PageInfo PageInfo `json:"pageInfo" form:"pageInfo"`
	Code     string   `json:"code" form:"code"`
	Name     string   `json:"name" form:"name"`
	Time     string   `json:"time" form:"time"`
}

type SearchProjectFileList struct {
	PageInfo PageInfo `json:"pageInfo" form:"pageInfo"`
	Code     string   `json:"code" form:"code"`
	Name     string   `json:"name" form:"name"`
	Genre    int      `json:"genre" form:"genre"`
}

type SearchIdNameGenre struct {
	PageInfo PageInfo `json:"pageInfo" form:"pageInfo"`
	Id       int      `json:"id" form:"id"`
	Name     string   `json:"name" form:"name"`
	Genre    int      `json:"genre" form:"genre"`
}

type SearchProjectProcess struct {
	PageInfo PageInfo `json:"pageInfo" form:"pageInfo"`
	UserId   int      `json:"userId" form:"userId"`
}

type Empty struct{}
