generated from pagopa/template-payments-java-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[P4ADEV-1667] create model and repository
- Loading branch information
1 parent
c67bce6
commit d09ad1b
Showing
21 changed files
with
454 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/main/java/it/gov/pagopa/pu/debtpositions/enums/PaymentOptionType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package it.gov.pagopa.pu.debtpositions.enums; | ||
|
||
public enum PaymentOptionType { | ||
SINGLE_INSTALLMENT, | ||
INSTALMENTS, | ||
DOWN_PAYMENT | ||
} |
38 changes: 38 additions & 0 deletions
38
src/main/java/it/gov/pagopa/pu/debtpositions/model/DebtPosition.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package it.gov.pagopa.pu.debtpositions.model; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.io.Serializable; | ||
import java.time.LocalDate; | ||
import java.time.LocalDateTime; | ||
|
||
@Entity | ||
@Table(name = "debt_position") | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Data | ||
public class DebtPosition implements Serializable { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "debt_position_generator") | ||
@SequenceGenerator(name = "debt_position_generator", sequenceName = "debt_position_seq", allocationSize = 1) | ||
private Long debtPositionId; | ||
private String iupdOrg; | ||
private String iupdPagoPa; | ||
private String description; | ||
private String status; | ||
private Long ingestionFlowFileId; | ||
private Long ingestionFlowFileLineNumber; | ||
private Long organizationId; | ||
private Long debtPositionTypeOrgId; | ||
private LocalDate notificationDate; | ||
private LocalDate validityDate; | ||
private boolean flagIuvVolatile; | ||
private LocalDateTime creationDate; | ||
private LocalDateTime updateDate; | ||
private Long operatorExternalUserId; | ||
|
||
} |
35 changes: 35 additions & 0 deletions
35
src/main/java/it/gov/pagopa/pu/debtpositions/model/DebtPositionType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package it.gov.pagopa.pu.debtpositions.model; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Entity | ||
@Table(name = "debt_position_type") | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Data | ||
public class DebtPositionType { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "debt_position_type_generator") | ||
@SequenceGenerator(name = "debt_position_type_generator", sequenceName = "debt_position_type_seq", allocationSize = 1) | ||
private Long debtPositionTypeId; | ||
private Long brokerId; | ||
private String code; | ||
private String description; | ||
private String orgType; | ||
private String macroArea; | ||
private String serviceType; | ||
private String collectingReason; | ||
private String taxonomyCode; | ||
private boolean flagAnonymousFiscalCode; | ||
private boolean flagMandatoryDueDate; | ||
private LocalDateTime creationDate; | ||
private LocalDateTime updateDate; | ||
private Long operatorExternalUserId; | ||
|
||
} |
47 changes: 47 additions & 0 deletions
47
src/main/java/it/gov/pagopa/pu/debtpositions/model/DebtPositionTypeOrg.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package it.gov.pagopa.pu.debtpositions.model; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Entity | ||
@Table(name = "debt_position_type_org") | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Data | ||
public class DebtPositionTypeOrg { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "debt_position_type_org_generator") | ||
@SequenceGenerator(name = "debt_position_type_org_generator", sequenceName = "debt_position_type_org_seq", allocationSize = 1) | ||
private Long debtPositionTypeOrgId; | ||
private Long debtPositionTypeId; | ||
private Long organizationId; | ||
private String balance; | ||
private String code; | ||
private String description; | ||
private String iban; | ||
private String postalIban; | ||
private String postalAccountCode; | ||
private String holderPostalCC; | ||
private String orgSector; | ||
private String xsdDefinitionRef; | ||
private Long amountCents; | ||
private String externalPaymentUrl; | ||
private boolean flagAnonymousFiscalCode; | ||
private boolean flagMandatoryDueDate; | ||
private boolean flagSpontaneous; | ||
private boolean flagNotifyIO; | ||
private boolean flagActive; | ||
private boolean flagNotifyOutcomePush; | ||
private Long notifyOutcomePushOrgSilServiceId; | ||
private boolean flagAmountActualization; | ||
private Long amountActualizationOrgSilServiceId; | ||
private LocalDateTime creationDate; | ||
private LocalDateTime updateDate; | ||
private Long operatorExternalUserId; | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/it/gov/pagopa/pu/debtpositions/model/DebtPositionTypeOrgOperators.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package it.gov.pagopa.pu.debtpositions.model; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Entity | ||
@Table(name = "debt_position_type_org_operators") | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Data | ||
public class DebtPositionTypeOrgOperators { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "debt_position_type_org_operators_generator") | ||
@SequenceGenerator(name = "debt_position_type_org_operators_generator", sequenceName = "debt_position_type_org_operators_seq", allocationSize = 1) | ||
private Long debtPositionTypeOrgOperatorId; | ||
private Long debtPositionTypeOrgId; | ||
private LocalDateTime creationDate; | ||
private LocalDateTime updateDate; | ||
private Long operatorExternalUserId; | ||
|
||
} |
42 changes: 42 additions & 0 deletions
42
src/main/java/it/gov/pagopa/pu/debtpositions/model/Installment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package it.gov.pagopa.pu.debtpositions.model; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.time.LocalDate; | ||
import java.time.LocalDateTime; | ||
|
||
@Entity | ||
@Table(name = "installment") | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Data | ||
public class Installment { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "installment_generator") | ||
@SequenceGenerator(name = "installment_generator", sequenceName = "installment_seq", allocationSize = 1) | ||
private Long installmentId; | ||
private Long paymentOptionId; | ||
private String status; | ||
private String iud; | ||
private String iuv; | ||
private String iur; | ||
private LocalDate dueDate; | ||
private String paymentTypeCode; | ||
private Long amountCents; | ||
private Long notificationFeeCents; | ||
private String remittanceInformation; | ||
private String humanFriendlyRemittanceInformation; | ||
private String balance; | ||
private String legacyPaymentMetadata; | ||
private Long personalDataId; | ||
private Character debtorEntityType; | ||
private byte[] debtorFiscalCodeHash; | ||
private LocalDateTime creationDate; | ||
private LocalDateTime updateDate; | ||
private Long operatorExternalUserId; | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
src/main/java/it/gov/pagopa/pu/debtpositions/model/IuvSequenceNumber.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package it.gov.pagopa.pu.debtpositions.model; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Entity | ||
@Table(name = "iuv_sequence_number") | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Data | ||
public class IuvSequenceNumber { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "iuv_sequence_number_generator") | ||
@SequenceGenerator(name = "iuv_sequence_number_generator", sequenceName = "iuv_sequence_number_seq", allocationSize = 1) | ||
private Long id; | ||
private Long organizationId; | ||
private Long sequenceNumber; | ||
private LocalDateTime creationDate; | ||
private LocalDateTime updateDate; | ||
private Long operatorExternalUserId; | ||
|
||
} |
35 changes: 35 additions & 0 deletions
35
src/main/java/it/gov/pagopa/pu/debtpositions/model/PaymentOption.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package it.gov.pagopa.pu.debtpositions.model; | ||
|
||
import it.gov.pagopa.pu.debtpositions.enums.PaymentOptionType; | ||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.time.LocalDate; | ||
import java.time.LocalDateTime; | ||
|
||
@Entity | ||
@Table(name = "payment_option") | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Data | ||
public class PaymentOption { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "payment_option_generator") | ||
@SequenceGenerator(name = "payment_option_generator", sequenceName = "payment_option_seq", allocationSize = 1) | ||
private Long paymentOptionId; | ||
private Long debtPositionId; | ||
private Long totalAmountCents; | ||
private String status; | ||
private boolean multiDebtor; | ||
private LocalDate dueDate; | ||
private String description; | ||
@Enumerated(EnumType.STRING) | ||
private PaymentOptionType paymentOptionType; | ||
private LocalDateTime creationDate; | ||
private LocalDateTime updateDate; | ||
private Long operatorExternalUserId; | ||
|
||
} |
52 changes: 52 additions & 0 deletions
52
src/main/java/it/gov/pagopa/pu/debtpositions/model/Receipt.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package it.gov.pagopa.pu.debtpositions.model; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.time.LocalDate; | ||
import java.time.LocalDateTime; | ||
|
||
@Entity | ||
@Table(name = "receipt") | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Data | ||
public class Receipt { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "receipt_generator") | ||
@SequenceGenerator(name = "receipt_generator", sequenceName = "receipt_seq", allocationSize = 1) | ||
private Long receiptId; | ||
private Long installmentId; | ||
private Long paymentReceiptId; | ||
private String noticeNumber; | ||
private String orgFiscalCode; | ||
private String outcome; | ||
private String creditorReferenceId; | ||
private Long paymentAmountCents; | ||
private String description; | ||
private String companyName; | ||
private String officeName; | ||
private String idPsp; | ||
private String pspFiscalCode; | ||
private String pspPartitaIva; | ||
private String pspCompanyName; | ||
private String idChannel; | ||
private String channelDescription; | ||
private String paymentMethod; | ||
private Long feeCents; | ||
private LocalDateTime paymentDateTime; | ||
private LocalDate applicationDate; | ||
private LocalDate transferDate; | ||
private byte[] receiptBytes; | ||
private boolean standin; | ||
private Character debtorEntityType; | ||
private Long personalDataId; | ||
private byte[] debtorFiscalCodeHash; | ||
private LocalDateTime creationDate; | ||
private LocalDateTime updateDate; | ||
private Long operatorExternalUserId; | ||
|
||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/it/gov/pagopa/pu/debtpositions/model/Stamp.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package it.gov.pagopa.pu.debtpositions.model; | ||
|
||
import jakarta.persistence.Embeddable; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Embeddable | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Data | ||
public class Stamp { | ||
|
||
private String stampType; | ||
private String stampHashDocument; | ||
private String stampProvincialResidence; | ||
|
||
} |
36 changes: 36 additions & 0 deletions
36
src/main/java/it/gov/pagopa/pu/debtpositions/model/Transfer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package it.gov.pagopa.pu.debtpositions.model; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Entity | ||
@Table(name = "transfer") | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Data | ||
public class Transfer { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "transfer_generator") | ||
@SequenceGenerator(name = "transfer_generator", sequenceName = "transfer_seq", allocationSize = 1) | ||
private Long transferId; | ||
private Long installmentId; | ||
private String orgFiscalCode; | ||
private String orgName; | ||
private Long amountCents; | ||
private String remittanceInformation; | ||
@Embedded | ||
private Stamp stamp; | ||
private String iban; | ||
private String postalIban; | ||
private String category; | ||
private Long transferIndex; | ||
private LocalDateTime creationDate; | ||
private LocalDateTime updateDate; | ||
private Long operatorExternalUserId; | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/it/gov/pagopa/pu/debtpositions/repository/DebtPositionRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package it.gov.pagopa.pu.debtpositions.repository; | ||
|
||
import it.gov.pagopa.pu.debtpositions.model.DebtPosition; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.rest.core.annotation.RepositoryRestResource; | ||
|
||
@RepositoryRestResource(collectionResourceRel = "debt_position", path = "debtPosition") | ||
public interface DebtPositionRepository extends JpaRepository<DebtPosition,Long> { | ||
|
||
} |
Oops, something went wrong.