package com.saas.shared.dto.mapper;

import com.saas.admin.dto.response.PermissionResponse;
import com.saas.admin.entity.Permission;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Mapper(componentModel = "spring")
public interface PermissionMapper {
    
    @Mapping(target = "permissionString", expression = "java(permission.getPermissionString())")
    PermissionResponse toResponse(Permission permission);
    
    List<PermissionResponse> toResponseList(List<Permission> permissions);
}
