package com.gcsc.connection.service.dto;

import com.gcsc.connection.service.entity.SnpApiDomain;

import java.time.LocalDateTime;

public record ApiDomainResponse(
    Long domainId,
    String domainName,
    String iconPath,
    Integer sortOrder,
    LocalDateTime createdAt,
    LocalDateTime updatedAt
) {

    public static ApiDomainResponse from(SnpApiDomain domain) {
        return new ApiDomainResponse(
            domain.getDomainId(),
            domain.getDomainName(),
            domain.getIconPath(),
            domain.getSortOrder(),
            domain.getCreatedAt(),
            domain.getUpdatedAt()
        );
    }
}
