187 lines
4.9 KiB
Java
187 lines
4.9 KiB
Java
package com.billpaymentservice.bbps.entites;
|
|
|
|
import java.util.List;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
|
import jakarta.persistence.CascadeType;
|
|
import jakarta.persistence.Column;
|
|
import jakarta.persistence.Entity;
|
|
import jakarta.persistence.FetchType;
|
|
import jakarta.persistence.Id;
|
|
import jakarta.persistence.JoinColumn;
|
|
import jakarta.persistence.OneToOne;
|
|
import jakarta.persistence.OneToMany;
|
|
import jakarta.persistence.Table;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.Getter;
|
|
import lombok.NoArgsConstructor;
|
|
import lombok.Setter;
|
|
import lombok.ToString;
|
|
|
|
@Getter
|
|
@Setter
|
|
@Entity
|
|
@Table(name = "bbps_transaction_master")
|
|
@ToString
|
|
@NoArgsConstructor
|
|
@AllArgsConstructor
|
|
public class TransactionMaster extends Auditable {
|
|
|
|
// 👇 JSON me "txn_id" aayega, ye DB me bank_txn_id column me save hoga
|
|
|
|
@JsonProperty("txn_id")
|
|
@Column(name = "bank_txn_id", nullable = false, unique = true)
|
|
private String bankTxnId;
|
|
|
|
// 👇 Apna internal transaction id, manually generate or system ke through
|
|
@Column(name = "txn_id")
|
|
private String txnId;
|
|
|
|
// 👇 New: txn id generated at the time of initiatePayment
|
|
@Id
|
|
@Column(name = "initiator_txn_id")
|
|
private String initiatorTxnId;
|
|
|
|
// 👇 New: txn id generated during internal check transaction status
|
|
@Column(name = "checker_txn_id")
|
|
private String checkerTxnId;
|
|
|
|
@Column(name = "client_user_id")
|
|
private String clientUserId;
|
|
|
|
@Column(name = "mid")
|
|
private String mid;
|
|
|
|
@Column(name = "req_id")
|
|
private String reqId;
|
|
|
|
@Column(name = "ref_id")
|
|
private String refId;
|
|
|
|
@Column(name = "txn_npci_id")
|
|
private String txnNpciId;
|
|
|
|
@Column(name = "payment_ref_id")
|
|
private String paymentRefId;
|
|
|
|
@Column(name = "remitter_name")
|
|
private String remitterName;
|
|
|
|
@Column(name = "order_id")
|
|
private String orderId;
|
|
|
|
@Column(name = "bill_id")
|
|
private String billId;
|
|
|
|
@Column(name = "user_type")
|
|
private String userType;
|
|
|
|
@Column(name = "user_id")
|
|
private String userId;
|
|
|
|
@Column(name = "txn_amount")
|
|
private Double txnAmount;
|
|
|
|
@Column(name = "total_txn_amount")
|
|
private Double totalTxnAmount;
|
|
|
|
@Column(name = "biller_id")
|
|
private String billerId;
|
|
|
|
@Column(name = "biller_category")
|
|
private String billerCategory;
|
|
|
|
@Column(name = "biller_name")
|
|
private String billerName;
|
|
|
|
@Column(name = "client_req_id")
|
|
private String clientReqId;
|
|
|
|
@Column(name = "off_us_pay")
|
|
private String offUsPay;
|
|
|
|
@Column(name = "split_pay")
|
|
private String splitPay;
|
|
|
|
@Column(name = "quick_pay")
|
|
private String quickPay;
|
|
|
|
@Column(name = "payment_mode")
|
|
private String paymentMode;
|
|
|
|
@Column(name = "agent_payment_information", columnDefinition = "TEXT")
|
|
private String agentPaymentInformation;
|
|
|
|
@Column(name = "cust_conv_fee")
|
|
private Double custConvFee;
|
|
|
|
@Column(name = "currency")
|
|
private String currency;
|
|
|
|
@Column(name = "status")
|
|
private String status;
|
|
|
|
@Column(name = "requested_ip")
|
|
private String requestedIp;
|
|
|
|
@Column(name = "customer_mob_no")
|
|
private String customerMobNo;
|
|
|
|
@Column(name = "mac_address")
|
|
private String macAddress;
|
|
|
|
@Column(name = "split_pay_amount")
|
|
private Double splitPayAmount;
|
|
|
|
@Column(name = "cou_cust_conv_fee")
|
|
private Double couCustConvFee;
|
|
|
|
@Column(name = "settlement_verification")
|
|
private Boolean settlementVerification;
|
|
|
|
@Column(name = "fund_txn_type")
|
|
private String fundTxnType;
|
|
|
|
@Column(name = "reason", columnDefinition = "TEXT")
|
|
private String reason;
|
|
|
|
@Column(name = "amount_tags", columnDefinition = "TEXT")
|
|
private String amountTags;
|
|
|
|
@Column(name = "payment_information", columnDefinition = "TEXT")
|
|
private String paymentInformation;
|
|
|
|
// ✅ Relation with DeviceBlockTagEntity
|
|
@OneToMany(mappedBy = "transactionMaster", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
|
private List<DeviceBlockTag> deviceBlockTags;
|
|
|
|
// ✅ Relation with CustomerParamEntity
|
|
@OneToMany(mappedBy = "transactionMaster", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
|
private List<CustomerParamTransaction> customerParams;
|
|
|
|
// ✅ Relation with PaymentStartRecord (one-to-one)
|
|
@OneToOne(fetch = FetchType.LAZY)
|
|
@JoinColumn(name = "payment_ref_id", referencedColumnName = "txn_id", insertable = false, updatable = false)
|
|
@JsonIgnore
|
|
private PaymentStartRecord paymentStartRecord;
|
|
|
|
@Column(name = "plan_id")
|
|
private String planId;
|
|
|
|
@Column(name = "plan_type")
|
|
private String planType;
|
|
|
|
@Column(name = "creation_date_bank")
|
|
private String creationDateBank;
|
|
|
|
@Column(name = "modified_date_bank")
|
|
private String modifiedDateBank;
|
|
|
|
@Column(name = "created_epoch_date_bank")
|
|
private Long createdEpochDateBank;
|
|
|
|
@Column(name = "modified_epoch_date_bank")
|
|
private Long modifiedEpochDateBank;
|
|
} |