Skip to content

Models License

License::Access

Summary

The License::Access model represents access permissions for profiles within the license system. It manages roles such as owner, ensuring proper access control within the application.

Fields/Columns

  • role: The role assigned to the profile (e.g., owner).
  • profile_id: The ID of the associated profile.

Relationships

  • belongs_to :profile: Each access is associated with a profile.

Concerns Used

  • LicenseTenant: Provides multi-tenant support for the model.

License::CurriculumProduct

Summary

The License::CurriculumProduct model represents curriculum products within the license system. It inherits from the License model and manages the association of curriculums with products.

Fields/Columns

  • name: The name of the curriculum product.
  • description: A description of the curriculum product.

Relationships

  • has_many :license_curriculums, dependent: :destroy: Each curriculum product can have many license curriculums.
  • has_many :curriculums, through: :license_curriculums: Each curriculum product can have many curriculums through license curriculums.

License::Profile

Summary

The License::Profile model represents user profiles within the license system. It manages access permissions and user-specific settings for license-related activities.

Fields/Columns

  • user_id: The ID of the associated user.

Relationships

  • has_many :accesses, dependent: :destroy, class_name: "License::Access": Each profile can have many accesses.

Concerns Used

  • LicenseTenant: Provides multi-tenant support for the model.

Validations

  • validates :user_id, uniqueness: {scope: :type}: Ensures that the user ID is unique within the scope of the profile type.