package com.gcsc.connection.common.dto;

import com.gcsc.connection.common.entity.SnpSystemConfig;

import java.time.LocalDateTime;

public record SystemConfigResponse(
    Long configId,
    String configKey,
    String configValue,
    String description,
    LocalDateTime createdAt,
    LocalDateTime updatedAt
) {

    public static SystemConfigResponse from(SnpSystemConfig config) {
        return new SystemConfigResponse(
            config.getConfigId(),
            config.getConfigKey(),
            config.getConfigValue(),
            config.getDescription(),
            config.getCreatedAt(),
            config.getUpdatedAt()
        );
    }
}
