From e168487152c03856a8bd63b3a565904feee272a4 Mon Sep 17 00:00:00 2001 From: hongwei Date: Tue, 3 Dec 2024 09:10:39 +0100 Subject: [PATCH] refactor/added the consentReferenceId ConsentProvider --- obp-api/src/main/scala/code/consent/ConsentProvider.scala | 5 +++++ obp-api/src/main/scala/code/consent/MappedConsent.scala | 1 + 2 files changed, 6 insertions(+) diff --git a/obp-api/src/main/scala/code/consent/ConsentProvider.scala b/obp-api/src/main/scala/code/consent/ConsentProvider.scala index b79452cd2..ab9ff4f2c 100644 --- a/obp-api/src/main/scala/code/consent/ConsentProvider.scala +++ b/obp-api/src/main/scala/code/consent/ConsentProvider.scala @@ -180,6 +180,11 @@ trait ConsentTrait { * Specified end date and time for the transaction query period. If the field does not contain information or if it is not sent in the request, the end date will be 90 calendar days prior to the creation of the consent. */ def transactionToDateTime: Date + + /** + * this will be a UUID later. now only use the primacyKey.toString for it. + */ + def consentReferenceId: String } object ConsentStatus extends Enumeration { diff --git a/obp-api/src/main/scala/code/consent/MappedConsent.scala b/obp-api/src/main/scala/code/consent/MappedConsent.scala index 99dc59aba..34fdd97c6 100644 --- a/obp-api/src/main/scala/code/consent/MappedConsent.scala +++ b/obp-api/src/main/scala/code/consent/MappedConsent.scala @@ -321,6 +321,7 @@ class MappedConsent extends ConsentTrait with LongKeyedMapper[MappedConsent] wit override def transactionToDateTime= mTransactionToDateTime.get override def creationDateTime= createdAt.get override def statusUpdateDateTime= mStatusUpdateDateTime.get + override def consentReferenceId = id.get.toString }