add signature setting
For multiple users it helps to keep track about who did what.
This commit is contained in:
@@ -55,6 +55,12 @@ class LunaEvent: Comparable<LunaEvent> {
|
||||
set(value) {
|
||||
jo.put("notes", value)
|
||||
}
|
||||
var signature: String
|
||||
get(): String = jo.optString("signature")
|
||||
set(value) {
|
||||
if (value.isNotEmpty())
|
||||
jo.put("signature", value)
|
||||
}
|
||||
|
||||
constructor(jo: JSONObject) {
|
||||
this.jo = jo
|
||||
@@ -63,16 +69,18 @@ class LunaEvent: Comparable<LunaEvent> {
|
||||
throw IllegalArgumentException("JSONObject is not a LunaEvent")
|
||||
}
|
||||
|
||||
constructor(type: String) {
|
||||
constructor(type: String, signature: String) {
|
||||
this.jo = JSONObject()
|
||||
this.time = System.currentTimeMillis() / 1000
|
||||
this.signature = signature
|
||||
this.type = type
|
||||
}
|
||||
|
||||
constructor(type: String, quantity: Int) {
|
||||
constructor(type: String, signature: String, quantity: Int) {
|
||||
this.jo = JSONObject()
|
||||
this.time = System.currentTimeMillis() / 1000
|
||||
this.type = type
|
||||
this.signature = signature
|
||||
this.quantity = quantity
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user