package com.lesingle.edu.common.mapper;

import com.lesingle.edu.dto.response.AdminUserResponse;
import com.lesingle.edu.entity.AdminUser;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * AdminUser Entity Mapper
 */
@Mapper(componentModel = "spring")
public interface AdminUserMapper {

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

    /**
     * Entity 转 Response
     */
    AdminUserResponse toVO(AdminUser entity);

    /**
     * Entity 列表转 Response 列表
     */
    List<AdminUserResponse> toVO(List<AdminUser> entities);

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