package com.seer.teach.common.convert;

import com.seer.teach.common.entity.ProvinceEntity;
import com.seer.teach.common.resp.ProvinceResp;
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:03
 */
@Mapper
public interface ProvinceConvert {
    ProvinceConvert INSTANCE = Mappers.getMapper(ProvinceConvert.class);

    @Mapping(source = "province", target = "title")
    @Mapping(source = "id", target = "id")
    ProvinceResp toProvinceResp(ProvinceEntity provinceEntity);

    List<ProvinceResp> toProvinceRespList(List<ProvinceEntity> list);
}
