added model indexes
This commit is contained in:
@@ -12,6 +12,18 @@ import java.math.BigDecimal;
|
||||
import java.util.UUID;
|
||||
|
||||
@Entity
|
||||
@Table(name = "transaction", indexes = {
|
||||
@Index(name = "idx_transaction_trace_type", columnList = "trace, type"),
|
||||
@Index(name = "idx_transaction_reference", columnList = "reference"),
|
||||
@Index(name = "idx_transaction_user_id", columnList = "user_id"),
|
||||
@Index(name = "idx_transaction_confirm_pay_integ", columnList = "confirmation_status, payment_status, integration_status"),
|
||||
@Index(name = "idx_transaction_pay_poll", columnList = "payment_status, polling_status"),
|
||||
@Index(name = "idx_transaction_status", columnList = "status"),
|
||||
@Index(name = "idx_transaction_created_at", columnList = "created_at"),
|
||||
@Index(name = "idx_transaction_debit_phone", columnList = "debit_phone"),
|
||||
@Index(name = "idx_transaction_credit_phone", columnList = "credit_phone"),
|
||||
@Index(name = "idx_transaction_workflow_id", columnList = "workflow_id"),
|
||||
})
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@@ -19,7 +31,9 @@ import java.util.UUID;
|
||||
@NoArgsConstructor
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@SQLRestriction("deleted = false")
|
||||
public class Transaction extends BaseEntity {
|
||||
@Column(name = "user_id")
|
||||
private String userId;
|
||||
private String trace;
|
||||
private String region;
|
||||
@@ -39,6 +53,7 @@ public class Transaction extends BaseEntity {
|
||||
private String rrn;
|
||||
private String channelName;
|
||||
private String channel;
|
||||
@Column(name = "debit_phone")
|
||||
private String debitPhone;
|
||||
private String debitAccount;
|
||||
@Enumerated(EnumType.STRING)
|
||||
@@ -47,6 +62,7 @@ public class Transaction extends BaseEntity {
|
||||
private String debitCard;
|
||||
private String debitRef;
|
||||
private String debitEmail;
|
||||
@Column(name = "credit_phone")
|
||||
private String creditPhone;
|
||||
private String creditAccount;
|
||||
@Enumerated(EnumType.STRING)
|
||||
@@ -69,14 +85,18 @@ public class Transaction extends BaseEntity {
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Status authorizationStatus;
|
||||
@Enumerated(EnumType.STRING)
|
||||
@Column(name = "confirmation_status")
|
||||
private Status confirmationStatus;
|
||||
@Enumerated(EnumType.STRING)
|
||||
@Column(name = "payment_status")
|
||||
private Status paymentStatus;
|
||||
@Enumerated(EnumType.STRING)
|
||||
@Column(name = "integration_status")
|
||||
private Status integrationStatus;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Status reversalStatus;
|
||||
@Enumerated(EnumType.STRING)
|
||||
@Column(name = "polling_status")
|
||||
private Status pollingStatus;
|
||||
|
||||
|
||||
@@ -92,7 +112,7 @@ public class Transaction extends BaseEntity {
|
||||
private String erpPurchasePaymentRef;
|
||||
private String erpCommissionJournalRef;
|
||||
|
||||
@Column(nullable = true)
|
||||
@Column(name = "workflow_id", nullable = true)
|
||||
private long workflowId;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
|
||||
Reference in New Issue
Block a user