adamsaghy commented on code in PR #5436:
URL: https://github.com/apache/fineract/pull/5436#discussion_r2763194907
##########
fineract-command/src/main/java/org/apache/fineract/command/persistence/domain/CommandEntity.java:
##########
@@ -19,65 +19,55 @@
package org.apache.fineract.command.persistence.domain;
import com.fasterxml.jackson.databind.JsonNode;
-import jakarta.persistence.Column;
-import jakarta.persistence.Convert;
-import jakarta.persistence.Entity;
-import jakarta.persistence.GeneratedValue;
-import jakarta.persistence.GenerationType;
-import jakarta.persistence.PostLoad;
-import jakarta.persistence.PrePersist;
-import jakarta.persistence.Table;
-import jakarta.persistence.Transient;
import java.io.Serial;
import java.io.Serializable;
-import java.time.OffsetDateTime;
-import java.util.UUID;
-import lombok.AccessLevel;
+import java.time.Instant;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.FieldNameConstants;
-import
org.apache.fineract.command.persistence.converter.JsonAttributeConverter;
+import org.springframework.data.annotation.Id;
+import org.springframework.data.relational.core.mapping.Column;
+import org.springframework.data.relational.core.mapping.Table;
@Getter
@Setter
@ToString
@FieldNameConstants
-@Entity
-@Table(name = "m_command")
+@Table("m_command")
public class CommandEntity implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
- @jakarta.persistence.Id
- @GeneratedValue(strategy = GenerationType.IDENTITY)
- @Column(name = "id")
+ @Id
+ @Column("id")
private Long id;
- @Transient
- @Setter(value = AccessLevel.NONE)
- private boolean isNew = true;
+ @Column("created_at")
+ private Instant createdAt;
Review Comment:
Since we are not just creating new entry for the request, but later update
with the response, we should have an updatedAt as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]