mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 02:04:33 +08:00
10 lines
323 B
Ruby
10 lines
323 B
Ruby
# frozen_string_literal: true
|
|
|
|
class UserAssignment < ApplicationRecord
|
|
belongs_to :assignable, polymorphic: true
|
|
belongs_to :user_role
|
|
belongs_to :user
|
|
belongs_to :assigned_by, foreign_key: 'assigned_by_id', class_name: 'User', optional: true
|
|
|
|
enum assigned: { automatically: 0, manually: 1 }, _suffix: true
|
|
end
|