2020-08-10 17:09:44 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class ExperimentUser < ApplicationRecord
|
2020-10-30 05:08:39 -04:00
|
|
|
include ::Gitlab::Experimentation::GroupTypes
|
|
|
|
|
2020-08-10 17:09:44 -04:00
|
|
|
belongs_to :experiment
|
|
|
|
belongs_to :user
|
|
|
|
|
2020-10-30 05:08:39 -04:00
|
|
|
enum group_type: { GROUP_CONTROL => 0, GROUP_EXPERIMENTAL => 1 }
|
2020-08-10 17:09:44 -04:00
|
|
|
|
2020-11-17 07:09:15 -05:00
|
|
|
validates :experiment_id, presence: true
|
|
|
|
validates :user_id, presence: true
|
2020-08-10 17:09:44 -04:00
|
|
|
validates :group_type, presence: true
|
|
|
|
end
|