2026-01-15 15:58:20 +09:00
|
|
|
package com.snp.batch.global.model;
|
|
|
|
|
|
|
|
|
|
import jakarta.persistence.*;
|
|
|
|
|
import lombok.*;
|
|
|
|
|
import org.hibernate.annotations.CreationTimestamp;
|
|
|
|
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
|
|
|
|
|
@Entity
|
2026-02-12 10:27:22 +09:00
|
|
|
@Table(name = "batch_api_log", schema = "t_std_snp_data")
|
2026-01-15 15:58:20 +09:00
|
|
|
@Getter
|
|
|
|
|
@NoArgsConstructor(access = AccessLevel.PROTECTED)
|
|
|
|
|
@AllArgsConstructor
|
|
|
|
|
@Builder
|
|
|
|
|
public class BatchApiLog {
|
|
|
|
|
|
|
|
|
|
@Id
|
|
|
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY) // PostgreSQL BIGSERIAL과 매핑
|
|
|
|
|
private Long logId;
|
|
|
|
|
|
|
|
|
|
@Column(name = "api_request_location") // job_name에서 변경
|
|
|
|
|
private String apiRequestLocation;
|
|
|
|
|
|
|
|
|
|
@Column(columnDefinition = "TEXT", nullable = false)
|
|
|
|
|
private String requestUri;
|
|
|
|
|
|
|
|
|
|
@Column(nullable = false, length = 10)
|
|
|
|
|
private String httpMethod;
|
|
|
|
|
|
|
|
|
|
private Integer statusCode;
|
|
|
|
|
|
|
|
|
|
private Long responseTimeMs;
|
|
|
|
|
|
|
|
|
|
@Column(name = "response_count")
|
|
|
|
|
private Long responseCount;
|
|
|
|
|
|
|
|
|
|
@Column(columnDefinition = "TEXT")
|
|
|
|
|
private String errorMessage;
|
|
|
|
|
|
|
|
|
|
@CreationTimestamp // 엔티티가 생성될 때 자동으로 시간 설정
|
|
|
|
|
@Column(updatable = false)
|
|
|
|
|
private LocalDateTime createdAt;
|
|
|
|
|
|
|
|
|
|
private Long jobExecutionId; // 추가
|
|
|
|
|
private Long stepExecutionId; // 추가
|
|
|
|
|
}
|