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.*;
import lombok.Getter;
import lombok.Setter;
import com.fasterxml.jackson.annotation.JsonProperty;
@Getter
@Setter
@Entity
@Table(name = "payment_channel")
public class PaymentChannel {
@Id
@Column(name = "payment_channel_limit_id")
@JsonProperty("paymentChannelLimitId") // 👈 Map JSON field to this property
private String id; // Primary key (manual, not auto-generated)
@NotBlank(message = "Payment channel is required")
@Column(name = "payment_channel", nullable = false)
private String paymentChannel;
@Min(value = 0, message = "Max limit cannot be negative")
@Column(name = "max_limit")
private long maxLimit;
@Min(value = 0, message = "Min limit cannot be negative")
@Column(name = "min_limit")
private long minLimit;
@Column(name = "support_pending_status")
private String supportPendingStatus;
// 🔗 Many PaymentChannels belong to one Biller
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "biller_id")
private BillerDetails biller;
}