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

// EventV2HireEcoBackgroundCheckCreatedV1 用户在招聘系统安排背调后, 系统会推送事件给对应的应用开发者。开发者可根据事件获取候选人信息、委托人信息和自定义字段信息, 并根据这些信息完成在三方服务商处的背调订单创建。
//
// doc: https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_background_check/events/created
// new doc: https://open.feishu.cn/document/server-docs/hire-v1/ecological-docking/eco_background_check/events/created
func (r *EventCallbackService) HandlerEventV2HireEcoBackgroundCheckCreatedV1(f EventV2HireEcoBackgroundCheckCreatedV1Handler) {
	r.cli.eventHandler.eventV2HireEcoBackgroundCheckCreatedV1Handler = f
}

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

// EventV2HireEcoBackgroundCheckCreatedV1 ...
type EventV2HireEcoBackgroundCheckCreatedV1 struct {
	BackgroundCheckID    string                                                   `json:"background_check_id,omitempty"`     // 背调 ID, 招聘系统内唯一
	AccountID            string                                                   `json:"account_id,omitempty"`              // 账号 ID, 招聘系统内唯一
	PackageID            string                                                   `json:"package_id,omitempty"`              // 套餐 ID
	AdditionalItemIDList []string                                                 `json:"additional_item_id_list,omitempty"` // 附件调查项 ID 列表
	Comment              string                                                   `json:"comment,omitempty"`                 // 备注
	CandidateInfo        *EventV2HireEcoBackgroundCheckCreatedV1CandidateInfo     `json:"candidate_info,omitempty"`          // 候选人信息
	ClientContactInfo    *EventV2HireEcoBackgroundCheckCreatedV1ClientContactInfo `json:"client_contact_info,omitempty"`     // 联系人（委托人）信息
	CustomFieldList      []*EventV2HireEcoBackgroundCheckCreatedV1CustomField     `json:"custom_field_list,omitempty"`       // 自定义字段键值对
}

// EventV2HireEcoBackgroundCheckCreatedV1CandidateInfo ...
type EventV2HireEcoBackgroundCheckCreatedV1CandidateInfo struct {
	Name      string                                                     `json:"name,omitempty"`       // 候选人姓名
	Mobile    *EventV2HireEcoBackgroundCheckCreatedV1CandidateInfoMobile `json:"mobile,omitempty"`     // 候选人手机号
	Email     string                                                     `json:"email,omitempty"`      // 候选人邮箱
	FirstName string                                                     `json:"first_name,omitempty"` // 名字
	LastName  string                                                     `json:"last_name,omitempty"`  // 姓氏
}

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

// EventV2HireEcoBackgroundCheckCreatedV1ClientContactInfo ...
type EventV2HireEcoBackgroundCheckCreatedV1ClientContactInfo struct {
	Name   string                                                         `json:"name,omitempty"`   // 联系人姓名
	Mobile *EventV2HireEcoBackgroundCheckCreatedV1ClientContactInfoMobile `json:"mobile,omitempty"` // 联系人手机号
	Email  string                                                         `json:"email,omitempty"`  // 联系人邮箱
}

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

// EventV2HireEcoBackgroundCheckCreatedV1CustomField ...
type EventV2HireEcoBackgroundCheckCreatedV1CustomField struct {
	Key   string `json:"key,omitempty"`   // 自定义字段标识
	Value string `json:"value,omitempty"` // 自定义字段值
}
