vidakovic commented on code in PR #5436: URL: https://github.com/apache/fineract/pull/5436#discussion_r2763465783
########## fineract-command/src/main/resources/db/changelog/tenant/module/command/parts/0001_command_init_postgres.xml: ########## @@ -22,28 +22,20 @@ <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd"> - <changeSet author="fineract" id="command-00001" context="postgresql"> + <changeSet author="fineract" id="command-00001" context="postgresql" failOnError="false"> <createTable tableName="m_command"> <column autoIncrement="true" name="id" type="bigint" remarks="Internal ID"> <constraints nullable="false" primaryKey="true"/> </column> - <column name="created_at" type="timestamp with time zone" /> - <column name="command_id" type="uuid" /> + <column name="created_at" type="timestamp" /> Review Comment: Done. ########## 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; - @Column(name = "command_id") - private UUID commandId; - - @Column(name = "created_at") - private OffsetDateTime createdAt; - - @Column(name = "tenant_id") + @Column("tenant_id") private String tenantId; Review Comment: Done. -- 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]
