diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-26 15:10:29 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-26 15:10:29 +0000 |
commit | c82ca12a1c5a359325cb45aaf01b483d1fa0efcb (patch) | |
tree | 86bba20fccbaf79f3277ffcba125201492f3e92b /app/models/issuable_severity.rb | |
parent | ff579119e2ecf2608370a1f24c4d791d28f269d9 (diff) | |
download | gitlab-ce-c82ca12a1c5a359325cb45aaf01b483d1fa0efcb.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/issuable_severity.rb')
-rw-r--r-- | app/models/issuable_severity.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/models/issuable_severity.rb b/app/models/issuable_severity.rb new file mode 100644 index 00000000000..cd3e967946b --- /dev/null +++ b/app/models/issuable_severity.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +class IssuableSeverity < ApplicationRecord + belongs_to :issue + + validates :issue, presence: true, uniqueness: true + validates :severity, presence: true + + enum severity: { + unknown: 0, + low: 1, + medium: 2, + high: 3, + critical: 4 + } +end |