Yes it's an object. Check this code: ``` object Us...
# exposed
w
Yes it's an object. Check this code:
Copy code
object Users: IntIdTable(), Serializable {
    val chatId = long("chat_id").uniqueIndex()
    val ethereumAddress = varchar("ethereum_address", 42)
    val hashedPassword = varchar("hashed_password", 191)
    val walletFile = varchar("wallet_file", 191)
    val registrationDate = datetime("registration_date").default(DateTime.now())
}

class User(id: EntityID<Int>): IntEntity(id), Serializable {
    companion object: IntEntityClass<User>(Users)

    var chatId by Users.chatId
    var ethereumAddress by Users.ethereumAddress
    var hashedPassword by Users.hashedPassword
    var walletFile by Users.walletFile

    fun sendMessage(message: String) {
        Bot.execute(SendMessage(
                chatId,
                message
        ))
    }
}
And pendingtransaction:
Copy code
object PendingTransactions: IntIdTable(), Serializable {
    val user = reference("user", Users)
    val amount = decimal("amount", 20, 10)
    val receiveAddress = varchar("receive_address", 42)
    val sent = bool("sent").default(false)
    val sentDate = datetime("sent_date").nullable()
}

class PendingTransaction(id: EntityID<Int>): IntEntity(id), Serializable {
    companion object: IntEntityClass<PendingTransaction>(PendingTransactions)

    var user by User referencedOn PendingTransactions.user
    var amount by PendingTransactions.amount
    var receiveAddress by PendingTransactions.receiveAddress
    var sent by PendingTransactions.sent
    var sentDate by PendingTransactions.sentDate
}