Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
[MCIL-29] update entity
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaconsalvi committed Apr 16, 2024
1 parent 030c14b commit 36414db
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
14 changes: 3 additions & 11 deletions src/main/java/it/pagopa/swclient/mil/dao/TerminalEntity.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package it.pagopa.swclient.mil.dao;

import io.quarkus.mongodb.panache.PanacheMongoEntity;
import io.quarkus.mongodb.panache.common.MongoEntity;
import lombok.*;

@ToString
@Data
@Builder
@Getter
@MongoEntity(database = "mil", collection = "terminalRegistry")
public class TerminalEntity {
public class TerminalEntity extends PanacheMongoEntity{

private String terminalUuid;

Expand All @@ -16,14 +18,4 @@ public class TerminalEntity {
private String serviceProviderId;

private Terminal terminal;

public TerminalEntity() {
}

public TerminalEntity(String terminalUuid, String terminalHandler, String serviceProviderId, Terminal terminal) {
this.terminalUuid = terminalUuid;
this.terminalHandler = terminalHandler;
this.serviceProviderId = serviceProviderId;
this.terminal = terminal;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ private TerminalEntity createTerminalEntity(TerminalDto terminalDto, String serv
.idpay(terminalDto.idpay())
.build();

return new TerminalEntity(terminalUuid,terminalDto.terminalHandlerId(),serviceProviderId,terminal);
return TerminalEntity.builder()
.terminalUuid(terminalUuid)
.terminalHandler(terminalDto.terminalHandlerId())
.serviceProviderId(serviceProviderId)
.terminal(terminal)
.build();
}
}

0 comments on commit 36414db

Please sign in to comment.