models/communities/CommunitiesAction.js

/** @class CommunitiesAction */
export default class CommunitiesAction {
    /**
     * Return name for a given action
     *
     * @memberof CommunitiesAction
     * @returns {string} Action name
     */
    static valueToName(value) {
        switch (value) {
            case CommunitiesAction.Post:
                return 'post';
            case CommunitiesAction.React:
                return 'react';
            case CommunitiesAction.Comment:
                return 'comment';
        }
    }
}

/** @memberof CommunitiesAction */
CommunitiesAction.Post = 0;
/** @memberof CommunitiesAction */
CommunitiesAction.React = 1;
/** @memberof CommunitiesAction */
CommunitiesAction.Comment = 2;