commit c4d994e9611e378ea7cf099870c651fe20db22b6
parent d33a8637dbf85a19065d6f501ab2896cb4b5b884
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date: Mon, 2 Dec 2019 20:10:46 +0100
again on plural names for tables
Diffstat:
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt
@@ -100,10 +100,10 @@ object BalancesTable : IntIdTable() {
}
class BalanceEntity(id: EntityID<Int>) : IntEntity(id) {
- companion object : IntEntityClass<BalanceEntity>(BalanceTable)
+ companion object : IntEntityClass<BalanceEntity>(BalancesTable)
- var value by BalanceTable.value
- var fraction by BalanceTable.fraction
+ var value by BalancesTable.value
+ var fraction by BalancesTable.fraction
}
/**
@@ -113,7 +113,7 @@ class BalanceEntity(id: EntityID<Int>) : IntEntity(id) {
object BankCustomersTable : IntIdTable() {
// Customer ID is the default 'id' field provided by the constructor.
val name = varchar("name", CUSTOMER_NAME_MAX_LENGTH).primaryKey()
- val balance = reference("balance", BalanceTable)
+ val balance = reference("balance", BalancesTable)
}
class BankCustomerEntity(id: EntityID<Int>) : IntEntity(id) {
@@ -177,7 +177,7 @@ object EbicsSubscribersTable : IntIdTable() {
val nextOrderID = integer("nextOrderID")
val state = enumeration("state", SubscriberState::class)
- val balance = reference("balance", BalanceTable)
+ val balance = reference("balance", BalancesTable)
}
class EbicsSubscriberEntity(id: EntityID<Int>) : IntEntity(id) {
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -125,7 +125,6 @@ fun main() {
nextOrderID = 1
}
-
BankCustomerEntity.new {
name = "Mina"
balance = BalanceEntity.new {