Class: Maquina::Membership

Inherits:
ApplicationRecord show all
Defined in:
app/models/maquina/membership.rb

Overview

A class representing the Membership model in the Maquina module. Links users to organizations and defines their roles and permissions within them.

Attributes

  • maquina_organization_id

    Foreign key reference to the associated Organization.

  • maquina_user_id

    Foreign key reference to the associated User.

  • owner

    Boolean flag indicating if the member is an owner of the organization.

  • role

    Enum defining the member’s role within the organization (configured via Maquina.configuration.membership_roles).

  • blocked_at

    Timestamp indicating when the membership was blocked, nil if active.

Associations

  • organization

    Belongs to an Organization.

  • user

    Belongs to a User.

Enums

  • role

    Available roles are defined in Maquina.configuration.membership_roles.

    These define the member’s permissions and access level within their organization.

Method Summary

Methods inherited from ApplicationRecord

searchable?