package com.gcsc.connection.tenant.dto;

import com.gcsc.connection.tenant.entity.SnpTenant;

import java.time.LocalDateTime;

public record TenantResponse(
    Long tenantId,
    String tenantCode,
    String tenantName,
    String description,
    Boolean isActive,
    LocalDateTime createdAt,
    LocalDateTime updatedAt
) {

    public static TenantResponse from(SnpTenant t) {
        return new TenantResponse(
            t.getTenantId(),
            t.getTenantCode(),
            t.getTenantName(),
            t.getDescription(),
            t.getIsActive(),
            t.getCreatedAt(),
            t.getUpdatedAt()
        );
    }
}
