# <%= autogenerated_model_warning %> class Role < ApplicationRecord include CanvasSync::ApiSyncable validates :canvas_id, uniqueness: true, presence: true has_many :admins, foreign_key: :canvas_role_id, primary_key: :canvas_id api_syncable({ canvas_id: :id, label: :label, base_role_type: :base_role_type, canvas_account_id: ->(r) { r.dig('account', 'id') }, permissions: :permissions, workflow_state: :workflow_state, }, -> (api) { api.get("/api/v1/accounts/#{canvas_account_id}/roles/#{canvas_id}") }) end