package com.lesingle.edu.common.mapper;

import com.lesingle.edu.dto.response.TenantPackageResponse;
import com.lesingle.edu.entity.TenantPackage;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * TenantPackage Entity Mapper
 */
@Mapper(componentModel = "spring")
public interface TenantPackageMapper {

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

    /**
     * Entity 转 Response
     */
    TenantPackageResponse toVO(TenantPackage entity);

    /**
     * Entity 列表转 Response 列表
     */
    List<TenantPackageResponse> toVO(List<TenantPackage> entities);

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