// Code generated by lark_sdk_gen. DO NOT EDIT.
/**
 * Copyright 2022 chyroc
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package lark

import (
	"context"
)

// EventV2CorehrOffboardingUpdatedV2 员工的离职信息变更会发送消息, 支持行鉴权
//
// doc: https://open.larkoffice.com/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/offboarding/events/updated
func (r *EventCallbackService) HandlerEventV2CorehrOffboardingUpdatedV2(f EventV2CorehrOffboardingUpdatedV2Handler) {
	r.cli.eventHandler.eventV2CorehrOffboardingUpdatedV2Handler = f
}

// EventV2CorehrOffboardingUpdatedV2Handler event EventV2CorehrOffboardingUpdatedV2 handler
type EventV2CorehrOffboardingUpdatedV2Handler func(ctx context.Context, cli *Lark, schema string, header *EventHeaderV2, event *EventV2CorehrOffboardingUpdatedV2) (string, error)

// EventV2CorehrOffboardingUpdatedV2 ...
type EventV2CorehrOffboardingUpdatedV2 struct {
	TenantID           string                                         `json:"tenant_id,omitempty"`            // Saas租户ID
	OffboardingInfoID  string                                         `json:"offboarding_info_id,omitempty"`  // 离职记录ID
	ProcessID          string                                         `json:"process_id,omitempty"`           // 离职流程ID
	ChecklistProcessID string                                         `json:"checklist_process_id,omitempty"` // 离职手续办了流程ID
	EmploymentID       string                                         `json:"employment_id,omitempty"`        // 离职员工雇佣ID
	Operator           string                                         `json:"operator,omitempty"`             // 操作人雇佣ID
	Status             int64                                          `json:"status,omitempty"`               // 变更后的离职状态, 可选值有: 1: 离职发起 = 审批中状态, 2: 审批通过, 3: 已离职, 4: 已拒绝, 5: 已撤销, 6: 无需审批
	ChecklistStatus    int64                                          `json:"checklist_status,omitempty"`     // 变更后的离职手续办理状态, 可选值有: 1: 未发起, 2: 进行中, 3: 已完成, 4: 已拒绝, 5: 已撤销
	UpdatedTime        string                                         `json:"updated_time,omitempty"`         // 更新时间毫秒时间戳
	UpdatedFields      []string                                       `json:"updated_fields,omitempty"`       // 所有变更的离职信息字段, 长度范围: `0` ～ `200`
	TargetUserID       *EventV2CorehrOffboardingUpdatedV2TargetUserID `json:"target_user_id,omitempty"`       // 用户 ID
}

// EventV2CorehrOffboardingUpdatedV2TargetUserID ...
type EventV2CorehrOffboardingUpdatedV2TargetUserID struct {
	UnionID string `json:"union_id,omitempty"` // 用户的 union id
	UserID  string `json:"user_id,omitempty"`  // 用户的 user id, 字段权限要求: 获取用户 user ID
	OpenID  string `json:"open_id,omitempty"`  // 用户的 open id
}
