diff --git a/src/main/java/com/billpaymentservice/bbps/entites/BillCustomerParams.java b/src/main/java/com/billpaymentservice/bbps/entites/BillCustomerParams.java index b6302bc..361fb5c 100644 --- a/src/main/java/com/billpaymentservice/bbps/entites/BillCustomerParams.java +++ b/src/main/java/com/billpaymentservice/bbps/entites/BillCustomerParams.java @@ -1,7 +1,5 @@ package com.billpaymentservice.bbps.entites; -import com.billpaymentservice.bbps.audit.Auditable; - import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; diff --git a/src/main/java/com/billpaymentservice/bbps/entites/InboundTraceLog.java b/src/main/java/com/billpaymentservice/bbps/entites/InboundTraceLog.java index 6f23804..551544f 100644 --- a/src/main/java/com/billpaymentservice/bbps/entites/InboundTraceLog.java +++ b/src/main/java/com/billpaymentservice/bbps/entites/InboundTraceLog.java @@ -14,52 +14,55 @@ import lombok.Setter; import lombok.ToString; @Entity -@Getter @Setter @NoArgsConstructor @ToString +@Getter +@Setter +@NoArgsConstructor +@ToString @Table(name = "bbps_inbound_trace_log") public class InboundTraceLog { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - private Long id; + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; - // 🔹 Identifiers - @Column(length = 50, unique = true) - private String requestId; // external requestId (from client) - @Column(length = 35) - private String txnId; // internally generated transaction id + // 🔹 Identifiers + @Column(length = 50, unique = true) + private String requestId; // external requestId (from client) + @Column(length = 35) + private String txnId; // internally generated transaction id - // 🔹 Source & API info - private String orgId; // tumhara org code (like ORG001) - private String mid; // merchant id from request - private String apiName; // e.g. getBillerByBillerId - private String httpMethod; // GET / POST + // 🔹 Source & API info + private String orgId; // tumhara org code (like ORG001) + private String mid; // merchant id from request + private String apiName; // e.g. getBillerByBillerId + private String httpMethod; // GET / POST - // 🔹 Request/Response data - @Column(columnDefinition = "TEXT") - private String requestPayload; // jo external ne bheja - @Column(columnDefinition = "TEXT") - private String responsePayload; // jo tumne wapas bheja + // 🔹 Request/Response data + @Column(columnDefinition = "TEXT") + private String requestPayload; // jo external ne bheja + @Column(columnDefinition = "TEXT") + private String responsePayload; // jo tumne wapas bheja - // 🔹 Status & timing - private String status; // SUCCESS / FAILED - private String responseCode; // like 200, 400 etc. - private LocalDateTime requestTime; // jab request aayi - private LocalDateTime responseTime; // jab response gaya - private LocalDateTime createdAt = LocalDateTime.now(); + // 🔹 Status & timing + private String status; // SUCCESS / FAILED + private String responseCode; // like 200, 400 etc. + private LocalDateTime requestTime; // jab request aayi + private LocalDateTime responseTime; // jab response gaya + private LocalDateTime createdAt = LocalDateTime.now(); - @Column(length = 255) - private String remark; // error ya note - - public InboundTraceLog(String requestId, String txnId, String apiName, String mid, - String orgId, String httpMethod, String requestPayload) { -this.requestId = requestId; -this.txnId = txnId; -this.apiName = apiName; -this.mid = mid; -this.orgId = orgId; -this.httpMethod = httpMethod; -this.requestPayload = requestPayload; -this.requestTime = LocalDateTime.now(); -this.createdAt = LocalDateTime.now(); -} + @Column(length = 255) + private String remark; // error ya note + + public InboundTraceLog(String requestId, String txnId, String apiName, String mid, String orgId, String httpMethod, + String requestPayload) { + this.requestId = requestId; + this.txnId = txnId; + this.apiName = apiName; + this.mid = mid; + this.orgId = orgId; + this.httpMethod = httpMethod; + this.requestPayload = requestPayload; + this.requestTime = LocalDateTime.now(); + this.createdAt = LocalDateTime.now(); + } } diff --git a/src/main/java/com/billpaymentservice/bbps/entites/OutboundTraceLog.java b/src/main/java/com/billpaymentservice/bbps/entites/OutboundTraceLog.java index 3a34043..b4815a6 100644 --- a/src/main/java/com/billpaymentservice/bbps/entites/OutboundTraceLog.java +++ b/src/main/java/com/billpaymentservice/bbps/entites/OutboundTraceLog.java @@ -14,47 +14,51 @@ import lombok.Setter; import lombok.ToString; @Entity -@Getter @Setter @NoArgsConstructor @ToString +@ToString +@Getter +@Setter +@NoArgsConstructor @Table(name = "bbps_outbound_trace_log") public class OutboundTraceLog { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - private Long id; + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long id; - // 🔹 Linking fields - private String requestId; // same as inbound ka requestId - private String txnId; // same txnId for full trace + // 🔹 Linking fields + private String requestId; // same as inbound ka requestId + private String txnId; // same txnId for full trace - // 🔹 API / endpoint info - private String apiName; // e.g. fetchBillerData - private String endpointUrl; // full URL of external API - private String httpMethod; // GET / POST + // 🔹 API / endpoint info + private String apiName; // e.g. fetchBillerData + private String endpointUrl; // full URL of external API + private String httpMethod; // GET / POST - // 🔹 Request/Response payloads - @Column(columnDefinition = "TEXT") - private String requestPayload; // jo tumne bheja external ko - @Column(columnDefinition = "TEXT") - private String responsePayload; // jo external ne bheja + // 🔹 Request/Response payloads + @Column(columnDefinition = "TEXT") + private String requestPayload; // jo tumne bheja external ko + @Column(columnDefinition = "TEXT") + private String responsePayload; // jo external ne bheja - // 🔹 Response/status - private String responseCode; // HTTP status code (200, 500, etc.) - private String status; // SUCCESS / FAILED - private LocalDateTime sendTime; // jab request gayi - private LocalDateTime responseReceiveTime; // jab response aaya - private LocalDateTime createdAt = LocalDateTime.now(); + // 🔹 Response/status + private String responseCode; // HTTP status code (200, 500, etc.) + private String status; // SUCCESS / FAILED + private LocalDateTime sendTime; // jab request gayi + private LocalDateTime responseReceiveTime; // jab response aaya + private LocalDateTime createdAt = LocalDateTime.now(); - @Column(length = 255) - private String remark; - public OutboundTraceLog(String txnId, String requestId, String apiName, - String endpointUrl, String httpMethod, String requestPayload) { -this.txnId = txnId; -this.requestId = requestId; -this.apiName = apiName; -this.endpointUrl = endpointUrl; -this.httpMethod = httpMethod; -this.requestPayload = requestPayload; -this.sendTime = LocalDateTime.now(); -this.createdAt = LocalDateTime.now(); -} + @Column(length = 255) + private String remark; + + public OutboundTraceLog(String txnId, String requestId, String apiName, String endpointUrl, String httpMethod, + String requestPayload) { + this.txnId = txnId; + this.requestId = requestId; + this.apiName = apiName; + this.endpointUrl = endpointUrl; + this.httpMethod = httpMethod; + this.requestPayload = requestPayload; + this.sendTime = LocalDateTime.now(); + this.createdAt = LocalDateTime.now(); + } } diff --git a/src/main/java/com/billpaymentservice/bbps/entites/UserEntity.java b/src/main/java/com/billpaymentservice/bbps/entites/UserEntity.java index a6c6295..2d234c1 100644 --- a/src/main/java/com/billpaymentservice/bbps/entites/UserEntity.java +++ b/src/main/java/com/billpaymentservice/bbps/entites/UserEntity.java @@ -38,4 +38,7 @@ public class UserEntity extends Auditable { @Column(name = "mid") private String mid; + @Column(name = "is_enabled") + private boolean enabled = true; + } \ No newline at end of file diff --git a/src/main/resources/application-local.properties b/src/main/resources/application-local.properties index a5a2da9..92c14ea 100644 --- a/src/main/resources/application-local.properties +++ b/src/main/resources/application-local.properties @@ -3,7 +3,6 @@ spring.application.name=bbps # Server port server.port=9090 -spring.jpa.open-in-view=false # JPA & Hibernate spring.jpa.hibernate.ddl-auto=update @@ -19,12 +18,11 @@ swagger.server.description=Local Development Server # DataSource -#spring.datasource.url=jdbc:postgresql://localhost:5432/devdbuat -spring.datasource.url=jdbc:postgresql://localhost:5432/bbps_enhanced +spring.datasource.url=jdbc:postgresql://localhost:5432/devdbuat spring.datasource.username=postgres -#spring.datasource.password=UAT@DB_2025 +spring.datasource.password=UAT@DB_2025 -spring.datasource.password=himanshu@123 +#spring.datasource.password=himanshu@123 spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.type=com.zaxxer.hikari.HikariDataSource