This commit is contained in:
Rinjae
2025-12-03 16:13:45 +09:00
parent 36de5b817b
commit e74b51a769
@@ -0,0 +1,148 @@
package com.eactive.apim.portal.obp.entity;
import com.eactive.eai.data.converter.LocalDateTimeToStringConverter17;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.Comment;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;
import javax.persistence.*;
import java.time.LocalDateTime;
@Data
@EqualsAndHashCode(callSuper = false)
@Entity
@Table(name = "ptl_obp_gw_metric")
public class ObpGwMetric {
@Id
@GeneratedValue(generator = "uuid-v1")
@GenericGenerator(
name = "uuid-v1",
strategy = "org.hibernate.id.UUIDGenerator",
parameters = {
@Parameter(
name = "uuid_gen_strategy_class",
value = "org.hibernate.id.uuid.CustomVersionOneStrategy"
)
}
)
@Column(length = 36)
@Comment("id")
private String id;
// json : appKey
@Column(length = 256, name = "client_id")
@Comment("클라이언트 ID")
private String clientId;
// json : clusterHostname
@Column(length = 50, name = "hostname")
@Comment("호스트 이름")
private String hostname;
// json : timeslice
@Column(length = 17, name = "timeslice")
@Convert(converter = LocalDateTimeToStringConverter17.class)
@CreationTimestamp
@Comment("타임슬라이스")
private LocalDateTime timeslice;
// json : apiName
@Column(name = "api_name", length = 255)
@Comment("API 이름")
private String apiName;
// json : apiRoutingUri
@Column(length = 255, name = "uri")
@Comment("URI")
private String uri;
// json : attemptedCount
@Column(name = "attempted_count")
@Comment("시도 횟수")
private Long attemptedCount;
// json : completedCount
@Column(name = "completed_count")
@Comment("완료 횟수")
private Long completedCount;
// // registeredOn
// @Column(name = "created_at", nullable = false)
// @Comment("생성 날짜와 시간. 레코드가 생성된 시간")
// private LocalDateTime createdAt;
//
// // registeredBy
// @Column(name = "created_by", nullable = false, length = 50)
// @Comment("생성한 사용자")
// private String createdBy = "_ANONYMOUS_SUBJECT_ID______";
//
// // modifiedOn
// @Column(name = "updated_at")
// @Comment("최종 업데이트 날짜와 시간. 레코드가 마지막으로 업데이트된 시간")
// private LocalDateTime updatedAt;
//
// // modifiedBy
// @Column(name = "updated_by", length = 50)
// @Comment("최종 업데이트한 사용자")
// private String modifiedBy;
// eapim ID
// json : apiIdByEapim
@Column(length = 36, name = "api_id")
@Comment("API ID(EAPIM)")
private String apiId;
// json : appIdByEapim
@Column(length = 36, name = "app_id")
private String appId;
// json : orgIdByEapim
@Column(length = 36, name = "org_id")
private String orgId;
// AS-IS 호환용 필드
// json : appId
@Column(length = 50, name = "app_id_by_ca_portal")
@Comment("애플리케이션 ID(CA 포탈)")
private String appIdByCaPortal;
// json : portalOrgId
@Column(length = 50, name = "org_id_by_ca_portal")
@Comment("기관 ID(CA 포탈)")
private String orgIdByCaPortal;
// json : portalApiId
@Column(length = 50, name = "api_id_by_ca_portal")
@Comment("API ID(CA 포탈)")
private String apiIdByCaPortal;
// json : partnerCode
@Column(length = 20, name = "partner_code")
@Comment("파트너 코드(OBP)")
private String partnerCode;
// json : apiId
@Column(name = "app_id_by_ca", length = 36)
@Comment("API ID(CA)")
private String apiIdByCa;
@Column
@Comment("업데이트(보정) 횟수")
private int updateCount;
// 더미
// requestUri
@Transient
private String requestUri = "-1";
}