diff options
Diffstat (limited to 'app/models/packages/event.rb')
-rw-r--r-- | app/models/packages/event.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/app/models/packages/event.rb b/app/models/packages/event.rb new file mode 100644 index 00000000000..f1d0af64ccd --- /dev/null +++ b/app/models/packages/event.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +class Packages::Event < ApplicationRecord + belongs_to :package, optional: true + + EVENT_SCOPES = ::Packages::Package.package_types.merge(container: 1000, tag: 1001).freeze + + enum event_scope: EVENT_SCOPES + + enum event_type: { + push_package: 0, + delete_package: 1, + pull_package: 2, + search_package: 3, + list_package: 4, + list_repositories: 5, + delete_repository: 6, + delete_tag: 7, + delete_tag_bulk: 8, + list_tags: 9, + cli_metadata: 10 + } + + enum originator_type: { user: 0, deploy_token: 1, guest: 2 } +end |