debian-mirror-gitlab/app/models/resource_events/abuse_report_event.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
631 B
Ruby
Raw Normal View History

2023-07-09 08:55:56 +05:30
# frozen_string_literal: true
module ResourceEvents
class AbuseReportEvent < ApplicationRecord
belongs_to :abuse_report, optional: false
belongs_to :user
validates :action, presence: true
enum action: {
ban_user: 1,
block_user: 2,
delete_user: 3,
close_report: 4,
ban_user_and_close_report: 5,
block_user_and_close_report: 6,
delete_user_and_close_report: 7
}
enum reason: {
spam: 1,
offensive: 2,
phishing: 3,
crypto: 4,
credentials: 5,
copyright: 6,
malware: 7,
other: 8,
unconfirmed: 9
}
end
end