-
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.
Fixed paymentinformation for receipt
- Loading branch information
Showing
15 changed files
with
139 additions
and
19 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
6 changes: 0 additions & 6 deletions
6
src/main/kotlin/com/example/autobank/data/ReceiptRequestBody.kt
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...n/com/example/autobank/data/Attachment.kt → ...ample/autobank/data/receipt/Attachment.kt
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
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,21 @@ | ||
package com.example.autobank.data.receipt | ||
|
||
import jakarta.persistence.* | ||
import org.jetbrains.annotations.NotNull | ||
|
||
@Entity | ||
@Table(name = "card") | ||
class Card ( | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "id") | ||
@NotNull | ||
val id: Int, | ||
|
||
@Column(name = "receipt_id") | ||
val receiptId: Int, | ||
|
||
@Column(name = "card_number") | ||
val card_number: String, | ||
|
||
) |
21 changes: 21 additions & 0 deletions
21
src/main/kotlin/com/example/autobank/data/receipt/Payment.kt
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,21 @@ | ||
package com.example.autobank.data.receipt | ||
|
||
import jakarta.persistence.* | ||
import org.jetbrains.annotations.NotNull | ||
|
||
@Entity | ||
@Table(name = "payment") | ||
class Payment ( | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "id") | ||
@NotNull | ||
val id: Int, | ||
|
||
@Column(name = "receipt_id") | ||
val receipt_id: Int, | ||
|
||
@Column(name = "account_number") | ||
val account_number: String, | ||
|
||
) |
2 changes: 1 addition & 1 deletion
2
...tlin/com/example/autobank/data/Receipt.kt → .../example/autobank/data/receipt/Receipt.kt
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.example.autobank.data | ||
package com.example.autobank.data.receipt | ||
|
||
|
||
import jakarta.persistence.* | ||
|
7 changes: 7 additions & 0 deletions
7
src/main/kotlin/com/example/autobank/data/receipt/ReceiptPaymentInformation.kt
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 com.example.autobank.data.receipt | ||
|
||
class ReceiptPaymentInformation ( | ||
val cardnumber: String?, | ||
val accountnumber: String?, | ||
val usedOnlineCard: Boolean, | ||
) |
11 changes: 11 additions & 0 deletions
11
src/main/kotlin/com/example/autobank/data/receipt/ReceiptRequestBody.kt
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,11 @@ | ||
package com.example.autobank.data.receipt | ||
|
||
import com.example.autobank.data.receipt.Receipt | ||
import jakarta.persistence.Entity | ||
|
||
|
||
class ReceiptRequestBody { | ||
val receipt: Receipt? = null | ||
val receiptPaymentInformation: ReceiptPaymentInformation? = null | ||
val attachments: Array<String> = arrayOf() | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/kotlin/com/example/autobank/data/receipt/ReceiptResponseBody.kt
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,11 @@ | ||
package com.example.autobank.data.receipt | ||
|
||
import com.example.autobank.data.receipt.Receipt | ||
import jakarta.persistence.Entity | ||
|
||
|
||
class ReceiptResponseBody { | ||
var receipt: Receipt? = null | ||
var receiptPaymentInformation: ReceiptPaymentInformation? = null | ||
var attachmentnames: Array<String> = arrayOf() | ||
} |
2 changes: 1 addition & 1 deletion
2
src/main/kotlin/com/example/autobank/repository/AttachmentRepository.kt
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
11 changes: 11 additions & 0 deletions
11
src/main/kotlin/com/example/autobank/repository/CardRepository.kt
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,11 @@ | ||
package com.example.autobank.repository | ||
|
||
import com.example.autobank.data.receipt.Card | ||
import org.springframework.data.jpa.repository.JpaRepository | ||
import org.springframework.stereotype.Repository | ||
|
||
@Repository | ||
interface CardRepository : JpaRepository<Card, Int> { | ||
|
||
|
||
} |
11 changes: 11 additions & 0 deletions
11
src/main/kotlin/com/example/autobank/repository/PaymentRepository.kt
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,11 @@ | ||
package com.example.autobank.repository | ||
|
||
import com.example.autobank.data.receipt.Payment | ||
import org.springframework.data.jpa.repository.JpaRepository | ||
import org.springframework.stereotype.Repository | ||
|
||
@Repository | ||
interface PaymentRepository : JpaRepository<Payment, Int> { | ||
|
||
|
||
} |
2 changes: 1 addition & 1 deletion
2
src/main/kotlin/com/example/autobank/repository/ReceiptRepository.kt
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
2 changes: 1 addition & 1 deletion
2
src/main/kotlin/com/example/autobank/service/AttachmentService.kt
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
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