package com.seer.teach.user.admin.convert;

import com.seer.teach.user.admin.request.TenantReq;
import com.seer.teach.user.response.TenantResp;
import com.seer.teach.user.entity.TenantEntity;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import jakarta.validation.Valid;
import java.util.List;

@Mapper
public interface AdminTenantConvert {

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

    TenantResp tenantEntity2TenantResp(TenantEntity entity);

    /**
     * 批量转换
     *
     * @param entities
     * @return
     */
    List<TenantResp> tenantEntities2TenantRespList(List<TenantEntity> entities);

    TenantEntity tenantReq2TenantEntity(@Valid TenantReq req);
}
