package com.lesingle.edu.common.mapper;

import com.lesingle.edu.dto.response.OperationLogResponse;
import com.lesingle.edu.entity.OperationLog;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * OperationLog Entity Mapper
 */
@Mapper(componentModel = "spring")
public interface OperationLogMapper {

    OperationLogMapper INSTANCE = Mappers.getMapper(OperationLogMapper.class);

    /**
     * Entity 转 Response
     */
    OperationLogResponse toVO(OperationLog entity);

    /**
     * Entity 列表转 Response 列表
     */
    List<OperationLogResponse> toVO(List<OperationLog> entities);

    /**
     * Response 转 Entity（用于创建/更新时）
     */
    OperationLog toEntity(OperationLogResponse vo);
}
