package de.sebse.fuplanner2.blackboard

import org.json.JSONObject

class BlackboardInfo {
    var id: String? = null

    constructor() { }

    constructor(json: String) {
        val obj = JSONObject(json)
        id = obj.opt("id") as String?
    }

    fun update(user: BlackboardInfo) {
        id = user.id?: id
    }

    override fun toString(): String {
        val obj = JSONObject()
        obj.put("id", id)
        return obj.toString()
    }
}