save billerdata to in database working code
This commit is contained in:
@@ -5,10 +5,12 @@ import jakarta.persistence.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@ToString
|
||||
@Table(name = "additional_info")
|
||||
public class AdditionalInfo {
|
||||
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
package com.billpaymentservice.bbps.entites;
|
||||
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.List;
|
||||
|
||||
import com.billpaymentservice.bbps.entites.BillerResponseParams;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
@Entity
|
||||
@Table(name = "amount_option")
|
||||
@@ -15,9 +13,9 @@ import com.billpaymentservice.bbps.entites.BillerResponseParams;
|
||||
public class AmountOption {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "amount_option_id")
|
||||
private Long id;
|
||||
@JsonProperty("amountOptionId") // ✅ JSON field map karo
|
||||
private String amountOptionId; // ✅ String type, manual ID
|
||||
|
||||
@ElementCollection
|
||||
@CollectionTable(
|
||||
@@ -31,4 +29,4 @@ public class AmountOption {
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "biller_response_id", nullable = false)
|
||||
private BillerResponseParams billerResponseParams;
|
||||
}
|
||||
}
|
||||
@@ -147,8 +147,10 @@ public class BillerDetails {
|
||||
@OneToMany(mappedBy = "biller", cascade = CascadeType.ALL, orphanRemoval = true)
|
||||
private List<AdditionalInfo> billerAdditionalInfos;
|
||||
|
||||
@OneToMany(mappedBy = "biller", cascade = CascadeType.ALL, orphanRemoval = true)
|
||||
private List<AdditionalInfo> billerAdditionalInfoPayments;
|
||||
/*
|
||||
* @OneToMany(mappedBy = "biller", cascade = CascadeType.ALL, orphanRemoval =
|
||||
* true) private List<AdditionalInfo> billerAdditionalInfoPayments;
|
||||
*/
|
||||
|
||||
@OneToMany(mappedBy = "biller", cascade = CascadeType.ALL, orphanRemoval = true)
|
||||
private List<InterchangeFeeConf> interchangeFeeConves;
|
||||
|
||||
@@ -4,7 +4,7 @@ import java.util.List;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import lombok.ToString;
|
||||
import jakarta.persistence.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import lombok.Getter;
|
||||
@@ -14,6 +14,7 @@ import java.util.List;
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@ToString
|
||||
@Table(name = "biller_plan_response_params")
|
||||
public class BillerPlanResponseParams {
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.billpaymentservice.bbps.entites;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "custom_param")
|
||||
public class CustomParam {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
@Column(name = "custom_param_name")
|
||||
private String customParamName;
|
||||
|
||||
@Column(name = "data_type")
|
||||
private String dataType;
|
||||
|
||||
@Column(name = "optional")
|
||||
private Boolean optional;
|
||||
|
||||
@Column(name = "min_length")
|
||||
private Integer minLength;
|
||||
|
||||
@Column(name = "max_length")
|
||||
private Integer maxLength;
|
||||
|
||||
@Column(name = "regex")
|
||||
private String regex;
|
||||
|
||||
@Column(name = "visibility")
|
||||
private Boolean visibility;
|
||||
|
||||
|
||||
}
|
||||
@@ -3,12 +3,14 @@ package com.billpaymentservice.bbps.entites;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@ToString
|
||||
@Table(name = "customer_param_groups")
|
||||
public class CustomerParamGroups {
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.billpaymentservice.bbps.entites;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "disposition_details")
|
||||
@ToString
|
||||
public class DispositionDetails {
|
||||
|
||||
@Id
|
||||
@Column(name = "disposition_id", nullable = false, unique = true)
|
||||
private String dispositionId; // UUID type string
|
||||
|
||||
@Column(name = "disposition_descr", nullable = false)
|
||||
private String dispositionDescr;
|
||||
|
||||
@Column(name = "tenant_id")
|
||||
private String tenantId;
|
||||
}
|
||||
@@ -4,8 +4,7 @@ import java.util.List;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
|
||||
import lombok.ToString;
|
||||
import jakarta.persistence.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import lombok.Getter;
|
||||
@@ -15,6 +14,7 @@ import java.util.List;
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@ToString
|
||||
@Table(name = "interchange_fee")
|
||||
public class InterchangeFee {
|
||||
|
||||
|
||||
@@ -4,18 +4,20 @@ import jakarta.persistence.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@ToString
|
||||
@Table(name = "payment_channel")
|
||||
public class PaymentChannel {
|
||||
|
||||
@Id
|
||||
@Id
|
||||
@Column(name = "payment_channel_limit_id")
|
||||
@JsonProperty("paymentChannelLimitId") // 👈 Map JSON field to this property
|
||||
private String id; // Primary key (manual, not auto-generated)
|
||||
private String paymentChannelLimitId; // Primary key (manual, not auto-generated)
|
||||
|
||||
@NotBlank(message = "Payment channel is required")
|
||||
@Column(name = "payment_channel", nullable = false)
|
||||
|
||||
@@ -2,15 +2,27 @@ package com.billpaymentservice.bbps.entites;
|
||||
|
||||
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.FetchType;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.JoinColumn;
|
||||
import jakarta.persistence.ManyToOne;
|
||||
import jakarta.persistence.Table;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import jakarta.validation.constraints.PositiveOrZero;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.ToString;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "biller_payment_modes")
|
||||
@ToString
|
||||
public class PaymentMode {
|
||||
|
||||
@Id
|
||||
|
||||
Reference in New Issue
Block a user