commit 10ff8c1160755d5f283603b02d7949c00c041f2e
parent 6c76c996e7e69aca8ea8454711a6a8e0333cf40b
Author: ms <ms@taler.net>
Date: Tue, 24 Aug 2021 22:04:55 +0200
camt53 tick
Diffstat:
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt
@@ -309,6 +309,9 @@ object BankAccountTransactionsTable : Table() {
val pmtInfId = text("pmtInfId").nullable()
val direction = text("direction")
val account = reference("account", BankAccountsTable)
+
+ // indicates whether the transaction got included in a C53 statement.
+ val c53 = bool("c53").default(false)
// It can't be unique (anymore), because one table might contain
// the same payment twice: once as DBIT and once as CRDT.
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -134,6 +134,14 @@ class Config : CliktCommand("Insert one configuration into the database") {
}
}
+class Camt053Tick : CliktCommand(
+ "Make a new Camt.053 time tick; all the fresh transactions" +
+ "will be inserted in a new Camt.053 report"
+) {
+ override fun run() {
+ TODO("Not yet implemented")
+ }
+}
class MakeTransaction : CliktCommand("Wire-transfer money between Sandbox bank accounts") {
init {
context {
@@ -308,7 +316,12 @@ class SandboxCommand : CliktCommand(invokeWithoutSubcommand = true, printHelpOnE
}
fun main(args: Array<String>) {
- SandboxCommand().subcommands(Serve(), ResetTables(), Config(), MakeTransaction()).main(args)
+ SandboxCommand().subcommands(
+ Serve(),
+ ResetTables(),
+ Config(),
+ MakeTransaction(),
+ Camt053Tick()).main(args)
}
suspend inline fun <reified T : Any> ApplicationCall.receiveJson(): T {