Documentation ¶
Index ¶
- type AddOrUpdateAdjustmentRoleReq
- type AddRoleReq
- type CreateRotaReq
- type DeleteAdjustmentRoleReq
- type DeleteReq
- type DetailById
- type DetailReq
- type GenerateShiftRosteredReq
- type Handler
- func (h *Handler) AddShiftAdjustmentRule(ctx *gin.Context, req AddOrUpdateAdjustmentRoleReq) (ginx.Result, error)
- func (h *Handler) AddShiftSchedulingRule(ctx *gin.Context, req AddRoleReq) (ginx.Result, error)
- func (h *Handler) Create(ctx *gin.Context, req CreateRotaReq) (ginx.Result, error)
- func (h *Handler) Delete(ctx *gin.Context, req DeleteReq) (ginx.Result, error)
- func (h *Handler) DeleteShiftAdjustmentRule(ctx *gin.Context, req DeleteAdjustmentRoleReq) (ginx.Result, error)
- func (h *Handler) Detail(ctx *gin.Context, req DetailReq) (ginx.Result, error)
- func (h *Handler) GenerateShiftRostered(ctx *gin.Context, req GenerateShiftRosteredReq) (ginx.Result, error)
- func (h *Handler) GetRuleListById(ctx *gin.Context, req DetailById) (ginx.Result, error)
- func (h *Handler) List(ctx *gin.Context, req ListReq) (ginx.Result, error)
- func (h *Handler) PrivateRoutes(server *gin.Engine)
- func (h *Handler) Update(ctx *gin.Context, req UpdateReq) (ginx.Result, error)
- func (h *Handler) UpdateShiftAdjustmentRule(ctx *gin.Context, req AddOrUpdateAdjustmentRoleReq) (ginx.Result, error)
- func (h *Handler) UpdateShiftSchedulingRole(ctx *gin.Context, req UpdateShiftRuleReq) (ginx.Result, error)
- type ListReq
- type RetrieveRotas
- type RetrieveShiftRostered
- type Rota
- type RotaAdjustmentRule
- type RotaGroup
- type RotaRule
- type Rotate
- type Schedule
- type UpdateReq
- type UpdateShiftRuleReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddOrUpdateAdjustmentRoleReq ¶
type AddOrUpdateAdjustmentRoleReq struct { Id int64 `json:"id"` GroupId int64 `json:"group_id"` RotaRule RotaAdjustmentRule `json:"rota_rule"` }
AddOrUpdateAdjustmentRoleReq 新增修改值班规则
type AddRoleReq ¶
AddRoleReq 新增值班规则
type CreateRotaReq ¶
type CreateRotaReq struct { Name string `json:"name"` Desc string `json:"desc"` Enabled bool `json:"enabled"` Owner int64 `json:"owner"` }
CreateRotaReq 创建值班请求
type DeleteAdjustmentRoleReq ¶
type DetailById ¶
type DetailById struct {
Id int64 `json:"id"`
}
type GenerateShiftRosteredReq ¶
type GenerateShiftRosteredReq struct { Id int64 `json:"id"` StartTime int64 `json:"start_time"` // 开始时间 EndTime int64 `json:"end_time"` // 结束时间 }
GenerateShiftRosteredReq 生成排班表请求
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) AddShiftAdjustmentRule ¶
func (h *Handler) AddShiftAdjustmentRule(ctx *gin.Context, req AddOrUpdateAdjustmentRoleReq) (ginx.Result, error)
AddShiftAdjustmentRule 新增临时排班规则
func (*Handler) AddShiftSchedulingRule ¶
AddShiftSchedulingRule 新增排班规则
func (*Handler) DeleteShiftAdjustmentRule ¶
func (*Handler) GenerateShiftRostered ¶
func (h *Handler) GenerateShiftRostered(ctx *gin.Context, req GenerateShiftRosteredReq) (ginx.Result, error)
GenerateShiftRostered 生成排班表
func (*Handler) GetRuleListById ¶
GetRuleListById 获取常规规则列表
func (*Handler) PrivateRoutes ¶
func (*Handler) UpdateShiftAdjustmentRule ¶
func (h *Handler) UpdateShiftAdjustmentRule(ctx *gin.Context, req AddOrUpdateAdjustmentRoleReq) (ginx.Result, error)
UpdateShiftAdjustmentRule 修改临时排班规则
func (*Handler) UpdateShiftSchedulingRole ¶
type RetrieveRotas ¶
type RetrieveShiftRostered ¶
type RotaAdjustmentRule ¶
type RotaAdjustmentRule struct { StartTime int64 `json:"start_time"` EndTime int64 `json:"end_time"` RotaGroup RotaGroup `json:"rota_group"` }
RotaAdjustmentRule 临时值班规则
type RotaGroup ¶
type RotaGroup struct { Id int64 `json:"id"` Name string `json:"name"` Members []int64 `json:"members"` }
RotaGroup 值班组
type RotaRule ¶
type RotaRule struct { StartTime int64 `json:"start_time"` EndTime int64 `json:"end_time"` RotaGroups []RotaGroup `json:"rota_groups"` Rotate Rotate `json:"rotate"` }
RotaRule 值班规则
type UpdateShiftRuleReq ¶
Click to show internal directories.
Click to hide internal directories.