skill-assessment-app/app/models/reviewer_vote.rb
2016-11-19 09:38:28 -06:00

19 lines
290 B
Ruby

# frozen_string_literal: true
class ReviewerVote < ApplicationRecord
belongs_to :candidate
belongs_to :user
validates :user_id, uniqueness: { scope: :candidate_id }
enum vote: {
undecided: 0,
yea: 1,
nay: 2
}
enum veto: {
approved: 1,
rejected: 2
}
end