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,46 @@
package com.billpaymentservice.bbps.entites;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
@Getter
@Setter
@Entity
@Table(name = "biller_groups")
public class Group {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "group_id")
private Long id;
@Column(name = "group_name")
private String name;
@Column(name = "input")
private String input;
// Example: "Admission No/Application No/GR No" → stored as multiple params
@ElementCollection
@CollectionTable(name = "group_params", joinColumns = @JoinColumn(name = "group_id"))
@Column(name = "param_name")
private List<String> params;
// 🔗 Parent group relationship (for nested groups)
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "parent_group_id")
private Group parentGroup;
// 🔁 Child groups (self-reference)
@OneToMany(mappedBy = "parentGroup", cascade = CascadeType.ALL, orphanRemoval = true)
private List<Group> groups;
// 🔗 Back reference to CustomerParamGroups
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "group_container_id")
private CustomerParamGroups customerParamGroups;
}