added a testing class for billers
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
package com.billpaymentservice.bbps.entites;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Entity
|
||||
@Table(name = "bill_validation")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class BillValidation {
|
||||
|
||||
@Id
|
||||
@Column(name = "bill_id", nullable = false, length = 100)
|
||||
private String billId;
|
||||
|
||||
@Column(name = "ref_id", length = 100)
|
||||
private String refId;
|
||||
|
||||
@Column(name = "biller_id", length = 100)
|
||||
private String billerId;
|
||||
|
||||
@Column(name = "status", length = 100)
|
||||
private String status;
|
||||
|
||||
@Column(name = "action_type", length = 100)
|
||||
private String actionType;
|
||||
|
||||
@Column(name = "user_id", length = 100)
|
||||
private String userId;
|
||||
|
||||
@Column(name = "biller_response", columnDefinition = "TEXT")
|
||||
private String billerResponse;
|
||||
|
||||
@Column(name = "additional_info", columnDefinition = "TEXT")
|
||||
private String additionalInfo;
|
||||
|
||||
// 👇 Proper nested customer params (OneToMany)
|
||||
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "bill")
|
||||
private List<CustomerParamBillValidation> customerParams;
|
||||
|
||||
@Column(name = "plan_info_daos", columnDefinition = "TEXT")
|
||||
private String planInfoDaos;
|
||||
|
||||
@Column(name = "creation_date", length = 50)
|
||||
private String creationDate;
|
||||
|
||||
@Column(name = "modified_date", length = 50)
|
||||
private String modifiedDate;
|
||||
|
||||
@Column(name = "created_epoch_date", length = 50)
|
||||
private String createdEpochDate;
|
||||
|
||||
@Column(name = "modified_epoch_date", length = 50)
|
||||
private String modifiedEpochDate;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.billpaymentservice.bbps.entites;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Entity
|
||||
@Table(name = "customer_params_bill_validate")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class CustomerParamBillValidation {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@Column(name = "id")
|
||||
private Long id;
|
||||
|
||||
@Column(name = "name")
|
||||
private String name;
|
||||
|
||||
@Column(name = "value")
|
||||
private String value;
|
||||
|
||||
@Column(name = "type")
|
||||
private String type;
|
||||
|
||||
// ✅ Many Params → One Bill
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "bill_id_fk")
|
||||
private BillValidation bill;
|
||||
}
|
||||
Reference in New Issue
Block a user