Migrate back to Kotlin

This commit is contained in:
GuilhermeWerner 2021-04-26 09:13:20 -03:00
parent c85413b7e0
commit 4fd93e904f
7 changed files with 23 additions and 109 deletions

View file

@ -2,16 +2,17 @@
package tribufu
class Library {
init()
private def init() {
// Used to load the 'TribuFu' library on application startup.
//System.loadLibrary("TribuFu")
}
class TribuFu {
/**
* A native method that is implemented by the 'TribuFu' native library.
* A native method that is implemented by the 'TribuFu' native library, which is packaged with
* this library.
*/
//@native def Hello(): Int
// external fun Hello(): Int
companion object {
// Used to load the 'TribuFu' library on application startup.
init {
//System.loadLibrary("TribuFu")
}
}
}

View file

@ -1,10 +0,0 @@
// Copyright (c) TribuFu. All Rights Reserved
package tribufu.models
class Email {
val address = ""
val user_id = "1"
val confirmed = false
val primary = true
}

View file

@ -1,53 +0,0 @@
// Copyright (c) TribuFu. All Rights Reserved
package tribufu.models
class User {
val id = ""
val name = ""
val display_name = ""
val password_hash = ""
val role = Role.User
val confirmed = false
val two_factor_enabled = false
val first_name = ""
val last_name = ""
val verified = false
val parental_control = false
val profile_url = ""
val public_birthday = false
val Birthday = ""
val location = ""
val timezone = ""
val language = ""
val currency = ""
val theme = Theme.Light
val ip_address = ""
val registration_ip_address = ""
val Joined = ""
val Updated = ""
val failed_logins = 0
val about = ""
val profile_views = 0
val content = 0
val avatar_url = ""
val background_url = ""
val status = Status.Offline
val LastOnline = ""
val LastActivity = ""
val LastPost = ""
val warnings = 0
val LastWarn = ""
}
object Role extends Enumeration {
val User, Bot, Helper, Tester, Developer, Moderator, Admin, Root = Value
}
object Theme extends Enumeration {
val Light, Dark = Value
}
object Status extends Enumeration {
val Offline, Away, Disturb, Online, Playing = Value
}

View file

@ -1,16 +0,0 @@
// Copyright (c) TribuFu. All Rights Reserved
package tribufu
import org.junit.runner.RunWith
import org.scalatest.funsuite.AnyFunSuite
import org.scalatestplus.junit.JUnitRunner
@RunWith(classOf[JUnitRunner])
class LibrarySuite extends AnyFunSuite {
test("Hello is always true") {
//def library = new Library()
//assert(library.Hello())
assert(true)
}
}