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

// EventV2HireEcoExamCreatedV1 用户在招聘系统安排笔试后, 系统会推送事件给对应的开发者应用。开发者可根据事件获取候选人信息和试卷信息, 并根据这些信息完成在三方服务商处的笔试订单创建。
//
// doc: https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_exam/events/created
// new doc: https://open.feishu.cn/document/server-docs/hire-v1/ecological-docking/eco_exam/events/created
func (r *EventCallbackService) HandlerEventV2HireEcoExamCreatedV1(f EventV2HireEcoExamCreatedV1Handler) {
	r.cli.eventHandler.eventV2HireEcoExamCreatedV1Handler = f
}

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

// EventV2HireEcoExamCreatedV1 ...
type EventV2HireEcoExamCreatedV1 struct {
	ExamID        string                                    `json:"exam_id,omitempty"`        // 笔试 ID, 招聘系统内唯一
	AccountID     string                                    `json:"account_id,omitempty"`     // 账号 ID, 招聘系统内唯一
	PaperID       string                                    `json:"paper_id,omitempty"`       // 试卷 ID
	CandidateInfo *EventV2HireEcoExamCreatedV1CandidateInfo `json:"candidate_info,omitempty"` // 候选人信息
}

// EventV2HireEcoExamCreatedV1CandidateInfo ...
type EventV2HireEcoExamCreatedV1CandidateInfo struct {
	Name   string                                          `json:"name,omitempty"`   // 候选人姓名
	Mobile *EventV2HireEcoExamCreatedV1CandidateInfoMobile `json:"mobile,omitempty"` // 候选人手机号
	Email  string                                          `json:"email,omitempty"`  // 候选人邮箱
}

// EventV2HireEcoExamCreatedV1CandidateInfoMobile ...
type EventV2HireEcoExamCreatedV1CandidateInfoMobile struct {
	Code   string `json:"code,omitempty"`   // 国家代码
	Number string `json:"number,omitempty"` // 手机号码
}
