models/communities/GroupMember.js

import User from './User.js';
import Membership from './Membership.js';

export default class GroupMember extends User {
    /**
     * Creates a GroupMember.
     *
     * @constructor GroupMember
     * @extends User
     * @param {Object} memberMap - Group Member parameters
     */
    constructor(memberMap) {
        super(memberMap.user);
        this.membership = new Membership(memberMap.membership);
        Object.freeze(this);
    }
}