package com.lesingle.edu.common.mapper;

import com.lesingle.edu.dto.response.ThemeResponse;
import com.lesingle.edu.entity.Theme;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * Theme Entity Mapper
 */
@Mapper(componentModel = "spring")
public interface ThemeMapper {

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

    /**
     * Entity 转 Response
     */
    ThemeResponse toVO(Theme entity);

    /**
     * Entity 列表转 Response 列表
     */
    List<ThemeResponse> toVO(List<Theme> entities);

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