Server

class Server(val id: ServerId = ServerId(), var name: String, var description: String = "", val owner: String, var users: MutableList<String> = mutableListOf(owner), var channels: MutableList<Channel> = mutableListOf()) : AggregateRoot<ServerId>

Constructors

Link copied to clipboard
constructor(id: ServerId = ServerId(), name: String, description: String = "", owner: String, users: MutableList<String> = mutableListOf(owner), channels: MutableList<Channel> = mutableListOf())

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val id: ServerId
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun addChannel(channel: Channel)
Link copied to clipboard
fun addUser(username: String)
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun isUserAdmin(username: String): Boolean
Link copied to clipboard
fun removeChannel(channel: Channel)
Link copied to clipboard
fun removeUser(username: String)