0
Hello, I have a java project and I’m having a hard time. The project is based on creating the functionalities of a bank, I have done everything of the accounts and customers. I already created the withdrawal, deposit and transfer transactions. And I put in the REST API with the Swagger. But I want to put an Extract functionality and wanted, when you do one of these transactions operations already record in the table extract in the description field and already pull the value. Follows the entity code of the extract.
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@Entity
@Table(name = "Extrato")
@EqualsAndHashCode(callSuper = true)
public class Extrato extends GenericEntity<Long>{
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column
private Double valor;
@Column
private String descricao;
@ManyToOne
private Conta conta;
}
can add the entities of the transactions as well?
– Jony Lima