package com.lesingle.edu.common.mapper;

import com.lesingle.edu.dto.response.SystemSettingResponse;
import com.lesingle.edu.entity.SystemSetting;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * SystemSetting Entity Mapper
 */
@Mapper(componentModel = "spring")
public interface SystemSettingMapper {

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

    /**
     * Entity 转 Response
     */
    SystemSettingResponse toVO(SystemSetting entity);

    /**
     * Entity 列表转 Response 列表
     */
    List<SystemSettingResponse> toVO(List<SystemSetting> entities);

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