78 lines
2.4 KiB
Java
78 lines
2.4 KiB
Java
package zw.qantra.tm.domain.models;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
import jakarta.persistence.*;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.Builder;
|
|
import lombok.Getter;
|
|
import lombok.NoArgsConstructor;
|
|
import lombok.Setter;
|
|
import org.hibernate.annotations.SQLRestriction;
|
|
import zw.qantra.tm.domain.enums.GroupBatchStatus;
|
|
|
|
import java.math.BigDecimal;
|
|
import java.time.LocalDateTime;
|
|
import java.util.UUID;
|
|
|
|
@Entity
|
|
@Table(name = "group_batch", indexes = {
|
|
@Index(name = "idx_group_batch_workspace_id", columnList = "workspace_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
|
|
@AllArgsConstructor
|
|
@NoArgsConstructor
|
|
@SQLRestriction("deleted = false")
|
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
public class GroupBatch extends BaseEntity {
|
|
@Column(name = "recipient_group_id")
|
|
private UUID recipientGroupId;
|
|
@Column(name = "workspace_id")
|
|
private UUID workspaceId;
|
|
@Column(name = "user_id")
|
|
private String userId;
|
|
private String description;
|
|
private String requestedBy;
|
|
private String currency;
|
|
|
|
@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;
|
|
private String requestIdempotencyKey;
|
|
private String pollIdempotencyKey;
|
|
private String paymentProcessorLabel;
|
|
private String paymentProcessorName;
|
|
private String paymentProcessorImage;
|
|
|
|
@Column(columnDefinition = "TEXT")
|
|
private String resultFileUrl;
|
|
|
|
private LocalDateTime confirmStartedAt;
|
|
private LocalDateTime requestStartedAt;
|
|
private LocalDateTime pollStartedAt;
|
|
private LocalDateTime integrationStartedAt;
|
|
private LocalDateTime completedAt;
|
|
|
|
@Column(columnDefinition = "TEXT")
|
|
private String transactionTemplate;
|
|
|
|
private Integer count;
|
|
private BigDecimal value;
|
|
private Integer successfulCount;
|
|
private Integer failedCount;
|
|
}
|
|
|