added model indexes
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
package zw.qantra.tm.domain.models;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.EnumType;
|
||||
import jakarta.persistence.Enumerated;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
@@ -18,6 +15,13 @@ import java.time.LocalDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
@Entity
|
||||
@Table(name = "group_batch", indexes = {
|
||||
@Index(name = "idx_group_batch_user_id", columnList = "user_id"),
|
||||
@Index(name = "idx_group_batch_status", columnList = "status"),
|
||||
@Index(name = "idx_group_batch_recipient_group_id", columnList = "recipient_group_id"),
|
||||
@Index(name = "idx_group_batch_created_at", columnList = "created_at"),
|
||||
@Index(name = "idx_group_batch_payment_ref", columnList = "payment_reference"),
|
||||
})
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@@ -26,7 +30,9 @@ import java.util.UUID;
|
||||
@SQLRestriction("deleted = false")
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class GroupBatch extends BaseEntity {
|
||||
@Column(name = "recipient_group_id")
|
||||
private UUID recipientGroupId;
|
||||
@Column(name = "user_id")
|
||||
private String userId;
|
||||
private String description;
|
||||
private String requestedBy;
|
||||
@@ -35,8 +41,11 @@ public class GroupBatch extends BaseEntity {
|
||||
@Enumerated(EnumType.STRING)
|
||||
private GroupBatchStatus status;
|
||||
|
||||
@Column(name = "payment_reference")
|
||||
private String paymentReference;
|
||||
@Column(name = "payment_transaction_id")
|
||||
private UUID paymentTransactionId;
|
||||
@Column(name = "workflow_id")
|
||||
private Long workflowId;
|
||||
|
||||
private String confirmIdempotencyKey;
|
||||
|
||||
Reference in New Issue
Block a user