cretaed entities for BillerDetail
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
package com.billpaymentservice.bbps.entites;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import jakarta.validation.constraints.*;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Entity
|
||||
@Table(name = "interchange_fee")
|
||||
public class InterchangeFee {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id; // Primary key
|
||||
|
||||
@Column(name = "interchange_fee_id", nullable = false, unique = true)
|
||||
@NotBlank(message = "Interchange Fee ID cannot be blank")
|
||||
private String interchangeFeeId;
|
||||
|
||||
@Column(name = "fee_code", nullable = false)
|
||||
@NotBlank(message = "Fee code is mandatory")
|
||||
private String feeCode;
|
||||
|
||||
@Column(name = "fee_description")
|
||||
private String feeDesc;
|
||||
|
||||
@Column(name = "fee_direction")
|
||||
private String feeDirection;
|
||||
|
||||
// ✅ Relationship with InterchangeFeeDetail (One-to-Many)
|
||||
@OneToMany(mappedBy = "interchangeFee", cascade = CascadeType.ALL, orphanRemoval = true)
|
||||
private List<InterchangeFeeDetail> interchangeFeeDetails;
|
||||
|
||||
// 🔗 Many InterchangeFee entries belong to one Biller
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "biller_id", nullable = false)
|
||||
private BillerDetails biller;
|
||||
}
|
||||
Reference in New Issue
Block a user