package com.seer.teach.common.convert;

import com.seer.teach.common.entity.CityEntity;
import com.seer.teach.common.resp.CityResp;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * <p>
 *
 * </p >
 *
 * @author Captain
 * @since 2025-08-13 15:18
 */
@Mapper
public interface CityConvert {

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

    @Mapping(source = "city", target = "title")
    @Mapping(source = "id", target = "id")
    CityResp toCityResp(CityEntity cityEntity);

    List<CityResp> toCityRespList(List<CityEntity> list);
}