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

import com.seer.teach.user.admin.request.AddRole;
import com.seer.teach.user.admin.request.UpdateRoleRequest;
import com.seer.teach.user.admin.response.RoleResp;
import com.seer.teach.user.entity.RoleEntity;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.Collection;
import java.util.List;

/**
 * @Author: Captain
 * @Description:
 * @Date: 2025-06-23 21:57
 */
@Mapper
public interface RoleConvert {

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

    RoleEntity toEntity(AddRole addRole);

    RoleEntity toEntity(UpdateRoleRequest params);

    RoleResp toRolePageResp(RoleEntity roleEntity);

    List<RoleResp> toRoleRespList(Collection<RoleEntity> roleEntityList);
}
