poc completed
This commit is contained in:
@@ -6,10 +6,13 @@ import jakarta.persistence.Id;
|
||||
import jakarta.persistence.MappedSuperclass;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.annotations.CreationTimestamp;
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.annotations.JdbcTypeCode;
|
||||
import org.hibernate.annotations.UpdateTimestamp;
|
||||
import org.hibernate.type.SqlTypes;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
@Getter
|
||||
@@ -25,4 +28,13 @@ public class BaseEntity {
|
||||
@JdbcTypeCode(SqlTypes.UUID)
|
||||
@Column(name = "id", updatable = false, nullable = false)
|
||||
private UUID id;
|
||||
|
||||
@CreationTimestamp
|
||||
@Column(name = "created_at", nullable = true, updatable = false)
|
||||
private LocalDateTime createdAt; // Or Date, Timestamp
|
||||
|
||||
@UpdateTimestamp
|
||||
@Column(name = "updated_at", nullable = true)
|
||||
private LocalDateTime updatedAt; // Or Date, Timestamp
|
||||
|
||||
}
|
||||
|
||||
@@ -17,4 +17,6 @@ public class Provider extends BaseEntity {
|
||||
private String externalId;
|
||||
private String image;
|
||||
private String category;
|
||||
private String accountFieldName;
|
||||
private String integrationProcessorLabel;
|
||||
}
|
||||
|
||||
21
src/main/java/zw/qantra/tm/domain/models/Recipient.java
Normal file
21
src/main/java/zw/qantra/tm/domain/models/Recipient.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package zw.qantra.tm.domain.models;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import lombok.*;
|
||||
|
||||
@Entity
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Recipient extends BaseEntity {
|
||||
private String name;
|
||||
private String email;
|
||||
private String phoneNumber;
|
||||
private String address;
|
||||
private String account;
|
||||
private String initials;
|
||||
private String latestProviderLabel;
|
||||
private String userId;
|
||||
}
|
||||
@@ -18,6 +18,7 @@ import java.math.BigDecimal;
|
||||
@NoArgsConstructor
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class Transaction extends BaseEntity {
|
||||
private String userId;
|
||||
private String trace;
|
||||
private BigDecimal amount;
|
||||
private BigDecimal charge;
|
||||
@@ -40,6 +41,7 @@ public class Transaction extends BaseEntity {
|
||||
private String debitName;
|
||||
private String debitCard;
|
||||
private String debitRef;
|
||||
private String debitEmail;
|
||||
private String creditPhone;
|
||||
private String creditAccount;
|
||||
@Enumerated(EnumType.STRING)
|
||||
@@ -47,11 +49,15 @@ public class Transaction extends BaseEntity {
|
||||
private String creditName;
|
||||
private String creditCard;
|
||||
private String creditRef;
|
||||
private String creditEmail;
|
||||
private String billClientId;
|
||||
private String clientSecret;
|
||||
private String aggregatorId;
|
||||
private String billName;
|
||||
private String billProductName;
|
||||
private String paymentProcessorName;
|
||||
private String providerImage;
|
||||
private String paymentProcessorImage;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private RequestType type;
|
||||
@Enumerated(EnumType.STRING)
|
||||
@@ -60,6 +66,7 @@ public class Transaction extends BaseEntity {
|
||||
@Column(columnDefinition = "TEXT")
|
||||
private String errorMessage;
|
||||
private String responseCode;
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Status status;
|
||||
@Column(columnDefinition = "TEXT")
|
||||
private String targetUrl;
|
||||
|
||||
Reference in New Issue
Block a user