cretaed entities for BillerDetail

This commit is contained in:
himanshu
2025-10-31 10:10:43 +05:30
parent 65cd50567d
commit 6ec6847ad2
31 changed files with 413 additions and 61 deletions
@@ -0,0 +1,39 @@
package com.billpaymentservice.bbps.entites;
import jakarta.persistence.*;
import jakarta.validation.constraints.NotBlank;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Getter
@Setter
@Entity
@Table(name = "biller_response_params")
public class BillerResponseParams {
@Id
@Column(name = "biller_response_id", nullable = false, unique = true)
@NotBlank(message = "Biller Response ID is required")
private String billerResponseId;
// 🔗 One-to-One Relationship with BillerDAO
@OneToOne
@JoinColumn(name = "biller_id", nullable = false)
private BillerDetails biller;
// ✅ Since params and amountOptions are lists of objects,
// we can store them as JSON or in a separate table (simplified here using @ElementCollection)
@ElementCollection
@CollectionTable(
name = "biller_response_params_data",
joinColumns = @JoinColumn(name = "biller_response_id")
)
@Column(name = "param_value")
private List<String> params;
@OneToMany(mappedBy = "billerResponseParams", cascade = CascadeType.ALL, orphanRemoval = true)
private List<AmountOption> amountOptions;
}