package com.lesingle.edu.common.mapper;

import com.lesingle.edu.dto.response.TenantResponse;
import com.lesingle.edu.entity.Tenant;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * Tenant Entity Mapper
 */
@Mapper(componentModel = "spring")
public interface TenantMapper {

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

    /**
     * Entity 转 Response
     */
    TenantResponse toVO(Tenant entity);

    /**
     * Entity 列表转 Response 列表
     */
    List<TenantResponse> toVO(List<Tenant> entities);

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