cretaed entities for BillerDetail
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user