user.js

/**
 * Class User represents conversation member (visitor or manager).
 * @see Visitor for detailed information about visitor
 * @see Manager for detailed information about manager
 * @property {string} uuid UUID is unique identifier for user. UUID for visitor sets automatically on starting.
 * Managers have UUID in their account.
 * @property {string} name
 * @property {string} email
 */
class User {

    constructor() {
        this.uuid = null;
        this.name = null;
        this.email = null;
        this.isOnline = null;
    }
    
    /**
     * Setter for UUID
     * @param {string} uuid
     */
	setUuid(uuid) {
		this.uuid = uuid;
	}

    /**
     * Getter for UUID
     *
     * @return {string|*}
     */
	getUuid() {
		return this.uuid;
	}

    /**
     * Setter for name
     * @param {string} name
     */
    setName(name) {
        this.name = name;
    }

    /**
     * Getter for name
     * @return {string}
     */
    getName() {
        return this.name;
    }

    /**
     * Setter for email
     * @param {string} email
     */
    setEmail(email) {
        this.email = email;
    }

    /**
     * Getter for email
     * @return {string|*}
     */
    getEmail() {
        return this.email;
    }

    /**
     * Setter for isOnline
     * @param {boolean} isOnline
     */
    setIsOnline(isOnline) {
        this.isOnline = isOnline;
    }

    /**
     * Getter for isOnline
     * @return {boolean}
     */
    getIsOnline() {
        return this.isOnline;
    }
}

export default User;