// 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"
)

// EventV2ElearningCourseRegistrationDeletedV2 课程学习进度删除时触发
//
// doc: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/elearning-v2/course_registration/events/deleted
func (r *EventCallbackService) HandlerEventV2ElearningCourseRegistrationDeletedV2(f EventV2ElearningCourseRegistrationDeletedV2Handler) {
	r.cli.eventHandler.eventV2ElearningCourseRegistrationDeletedV2Handler = f
}

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

// EventV2ElearningCourseRegistrationDeletedV2 ...
type EventV2ElearningCourseRegistrationDeletedV2 struct {
	CourseID string                                              `json:"course_id,omitempty"` // 课程ID
	Learner  *EventV2ElearningCourseRegistrationDeletedV2Learner `json:"learner,omitempty"`   // 课程学员信息
}

// EventV2ElearningCourseRegistrationDeletedV2Learner ...
type EventV2ElearningCourseRegistrationDeletedV2Learner struct {
	UserID *EventV2ElearningCourseRegistrationDeletedV2LearnerUserID `json:"user_id,omitempty"` // 用户 ID
	Email  string                                                    `json:"email,omitempty"`   // 用户的 email
	Phone  string                                                    `json:"phone,omitempty"`   // 用户的手机号
}

// EventV2ElearningCourseRegistrationDeletedV2LearnerUserID ...
type EventV2ElearningCourseRegistrationDeletedV2LearnerUserID 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
}
