# Code generated by lark_sdk_gen. DO NOT EDIT.

from pylark.lark_request import RawRequestReq, _new_method_option
import attr
import typing
import io


@attr.s
class BatchCreateAttendanceUserFlowReqFlowRecord(object):
    user_id: str = attr.ib(default="", metadata={"req_type": "json"})  # 员工工号
    creator_id: str = attr.ib(default="", metadata={"req_type": "json"})  # 打卡记录创建者的工号
    location_name: str = attr.ib(default="", metadata={"req_type": "json"})  # 打卡位置名称信息
    check_time: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # 打卡时间，精确到秒的时间戳
    comment: str = attr.ib(default="", metadata={"req_type": "json"})  # 打卡备注


@attr.s
class BatchCreateAttendanceUserFlowReqEmployeeType(object):
    pass


@attr.s
class BatchCreateAttendanceUserFlowReq(object):
    employee_type: BatchCreateAttendanceUserFlowReqEmployeeType = attr.ib(
        factory=lambda: BatchCreateAttendanceUserFlowReqEmployeeType(),
        metadata={"req_type": "query"},
    )  # 请求体中的 user_id 和 creator_id 的员工工号类型，可用值：【employee_id（员工的 employeeId），employee_no（员工工号）】，示例值："employee_id"
    flow_records: typing.List[BatchCreateAttendanceUserFlowReqFlowRecord] = attr.ib(
        factory=lambda: [], metadata={"req_type": "json"}
    )  # 打卡流水记录列表


@attr.s
class BatchCreateAttendanceUserFlowRespFlowRecord(object):
    user_id: str = attr.ib(default="", metadata={"req_type": "json"})  # 员工工号
    creator_id: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # 打卡记录创建者的 employee_no
    location_name: str = attr.ib(default="", metadata={"req_type": "json"})  # 打卡位置名称信息
    check_time: str = attr.ib(
        default="", metadata={"req_type": "json"}
    )  # 打卡时间，精确到秒的时间戳
    comment: str = attr.ib(default="", metadata={"req_type": "json"})  # 打卡备注


@attr.s
class BatchCreateAttendanceUserFlowResp(object):
    flow_records: typing.List[BatchCreateAttendanceUserFlowRespFlowRecord] = attr.ib(
        factory=lambda: [], metadata={"req_type": "json"}
    )  # 打卡流水记录列表


def _gen_batch_create_attendance_user_flow_req(request, options) -> RawRequestReq:
    return RawRequestReq(
        dataclass=BatchCreateAttendanceUserFlowResp,
        scope="Attendance",
        api="BatchCreateAttendanceUserFlow",
        method="POST",
        url="https://open.feishu.cn/open-apis/attendance/v1/user_flows/batch_create",
        body=request,
        method_option=_new_method_option(options),
        need_tenant_access_token=True,
    )
