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

// EventV2HireEcoAccountCreatedV1 招聘管理员添加三方服务商帐号时, 系统会推送事件给应用开发者, 开发者可根据事件获取用户添加的帐号类型（背调 或 笔试）和 帐号自定义字段信息, 并根据这些信息识别用户在服务商处的身份, 完成三方服务商帐号 和 招聘帐号之间的绑定, 并根据用户服务商身份推送对应的背调套餐或试卷列表。
//
// doc: https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_account/events/created
// new doc: https://open.feishu.cn/document/server-docs/hire-v1/ecological-docking/eco_account/events/created
func (r *EventCallbackService) HandlerEventV2HireEcoAccountCreatedV1(f EventV2HireEcoAccountCreatedV1Handler) {
	r.cli.eventHandler.eventV2HireEcoAccountCreatedV1Handler = f
}

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

// EventV2HireEcoAccountCreatedV1 ...
type EventV2HireEcoAccountCreatedV1 struct {
	Scope           int64                                        `json:"scope,omitempty"`             // 账号类型, 可选值有: 1: 背调账号, 2: 笔试账号
	AccountID       string                                       `json:"account_id,omitempty"`        // 账号 ID, 招聘系统内唯一
	AccountName     string                                       `json:"account_name,omitempty"`      // 账号名称
	UsageList       []int64                                      `json:"usage_list,omitempty"`        // 账号适用范围, 1-社招, 2-校招
	CustomFieldList []*EventV2HireEcoAccountCreatedV1CustomField `json:"custom_field_list,omitempty"` // 自定义字段键值对
}

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