v1

package
v0.0.0-...-da91ef8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthRequest

type AuthRequest struct {
	AuthCode string `json:"authCode" valid:"required"`
}

AuthRequest 指定了 `POST /api/v1/auth/dingtalk` 接口的请求参数.

type AuthResponse

type AuthResponse struct {
	Token string `json:"token"`
}

AuthResponse 指定了 `POST /api/v1/auth/dingtalk` 接口的返回参数.

type CreateKeyResultResponse

type CreateKeyResultResponse struct {
	ID string `json:"id"`
}

type CreateObjectiveResponse

type CreateObjectiveResponse struct {
	ID string `json:"id"`
}

type CreateOrUpdateKeyResult

type CreateOrUpdateKeyResult struct {
	Title        string `json:"title" binding:"required"`
	Weight       int    `json:"weight" binding:"required,min=1,max=100"`
	Date         string `json:"date" binding:"required,monthYearFormat"`
	Completed    string `json:"completed" binding:"required,oneof=未开始 已完成 未完成"`
	SelfRating   *int   `json:"selfRating" binding:"omitempty,min=0,max=120"`
	Reason       string `json:"reason" binding:"omitempty"`
	LeaderRating *int   `json:"leaderRating,omitempty" binding:"omitempty"`
	UserId       string `json:"userId" binding:"omitempty"`
	ObjectiveID  string `json:"objectiveID" binding:"omitempty"`
	Criteria     string `json:"criteria" binding:"omitempty"`
}

type CreateOrUpdateObjective

type CreateOrUpdateObjective struct {
	Title  string `json:"title" binding:"required"`
	Date   string `json:"date" binding:"required,monthYearFormat"`
	Weight int    `json:"weight" binding:"omitempty,min=0,max=100"`
	UserId string `json:"userId,omitempty"`
}

type DeleteObjectiveReq

type DeleteObjectiveReq struct {
	DeleteRecordReq
	KeyResultIDs []string `json:"keyResultIds"` // 从 JSON 请求体绑定关键结果的 IDs
	UserId       string   `json:"userId,omitempty"`
}

type DeleteRecordReq

type DeleteRecordReq struct {
	ID string `uri:"id" binding:"required"`
}

type DepartmentDetails

type DepartmentDetails struct {
	Name     string `json:"name"`
	IsLeader bool   `json:"isLeader"`
}

DepartmentDetails 结构体用于在API响应中包含部门信息

type FieldMappingsResponse

type FieldMappingsResponse struct {
	Objective ObjectiveField `json:"objective"`
	KeyResult KeyResultField `json:"keyResult"`
}

FieldMappingsResponse 指定了 `POST /api/v1/fields` 接口的返回参数.

type KeyResult

type KeyResult struct {
	ID               string `json:"id"`
	Title            string `json:"title"`
	Weight           int    `json:"weight"`
	Owner            string `json:"owner"`
	Date             string `json:"date"`
	Completed        string `json:"completed"`
	SelfRating       *int   `json:"selfRating"`
	Reason           string `json:"reason"`
	ObjectiveID      string `json:"objectiveID"`
	Criteria         string `json:"criteria"`
	Leader           string `json:"leader"`
	LeaderRating     *int   `json:"leaderRating"`
	Department       string `json:"department"`
	CreatedTime      int64  `json:"createdTime"`
	LastModifiedTime int64  `json:"lastModifiedTime"`
}

type KeyResultField

type KeyResultField struct {
	Title        string `json:"title" field:"fldrxgL9LV"`
	Owner        string `json:"owner" field:"fldjEZmY3S"`
	Date         string `json:"date" field:"fldnMxJlKj"`
	Weight       string `json:"weight" field:"fld5HXzwmN"`
	Completed    string `json:"completed" field:"fldG2nSDTZ"`
	SelfRating   string `json:"selfRating" field:"fldvjvtxRr"`
	Criteria     string `json:"criteria" field:"fldPGxpg2b"`
	ObjectiveID  string `json:"objectiveId" field:"fldW8TFesB"`
	Reason       string `json:"reason" field:"fld6OsYad8"`
	Leader       string `json:"leader" field:"fldfPqFgwt"`
	LeaderRating string `json:"leaderRating" field:"fld6x4tz0t"`
	Department   string `json:"department" field:"fldeDq4odj"`
}

type ListOkrRequest

type ListOkrRequest struct {
	Months  []string `json:"months" form:"months" binding:"omitempty,dive,monthYearFormat"`
	SortBy  string   `json:"sortBy" form:"sortBy" binding:"omitempty"`
	UserID  string   `json:"userId" form:"userId" binding:"omitempty"`
	OrderBy string   `json:"orderBy" form:"orderBy" binding:"omitempty"`
}

ListOkrResquest 指定了 `GET|POST /api/v1/okrs` 接口的请求参数.

type ListOkrResponse

type ListOkrResponse struct {
	Okrs map[string][]Objective `json:"okrs"`
}

ListOkrResponse 指定了 `GET|POST /api/v1/okrs` 接口的返回参数.

type Objective

type Objective struct {
	ID               string      `json:"id"`
	Title            string      `json:"title"`
	Owner            string      `json:"owner"`
	Date             string      `json:"date"`
	Weight           int         `json:"weight"`
	KeyResults       []KeyResult `json:"keyResults"`
	CreatedTime      int64       `json:"createdTime"`
	LastModifiedTime int64       `json:"lastModifiedTime"`
}

type ObjectiveField

type ObjectiveField struct {
	Title        string `json:"title" field:"fldp1iQXFv"`
	Owner        string `json:"owner" field:"fld8vFDsXz"`
	Date         string `json:"date" field:"fldc36J6LW"`
	Weight       string `json:"weight" field:"fldgooDzO7"`
	KeyResultIDs string `json:"keyResultIds" field:"fld1dLUo8S"`
}

type TreeNode

type TreeNode struct {
	Title    string      `json:"title"`
	Key      string      `json:"key"`
	Sort     int         `json:"sort"`
	Role     string      `json:"role,omitempty"`
	Position string      `json:"position,omitempty"`
	Children []*TreeNode `json:"children,omitempty"`
}

type UpdateRecordReq

type UpdateRecordReq struct {
	ID string `uri:"id" binding:"required"`
}

type UserResponse

type UserResponse struct {
	UserID      string              `json:"uid"`
	Name        string              `json:"name"`
	Title       string              `json:"title"`
	Status      string              `json:"status"`
	Avatar      string              `json:"avatar"`
	JobNumber   string              `json:"jobNumber"`
	HiredDate   *time.Time          `json:"hiredDate,omitempty"` // 入职日期
	Roles       []string            `json:"roles"`
	Departments []DepartmentDetails `json:"departments"`
}

UserResponse 结构体用于API响应

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL