package database

data class Messagebank(
    var index : UInt,
    var Description: String,
    var Language: String,
    var ANN_ID : UInt,
    var Voice_Type: String,
    var Message_Detail: String,
    var Message_TAGS: String
    ) {

    /**
     * Check if all fields are not empty and ANN_ID > 0
     */
    fun isNotEmpty(): Boolean{
        if (Description.isNotEmpty()){
            if (Language.isNotEmpty()){
                if (Voice_Type.isNotEmpty()){
                    if (Message_Detail.isNotEmpty()){
                        if (Message_TAGS.isNotEmpty()){
                            return true
                        }
                    }
                }
            }
        }
        return false
    }

    override fun toString(): String {
        return "Messagebank(index=$index, Description='$Description', Language='$Language', ANN_ID=$ANN_ID, Voice_Type='$Voice_Type', Message_Detail='$Message_Detail', Message_TAGS='$Message_TAGS')"
    }
}
