debian-mirror-gitlab/app/models/packages/composer/metadatum.rb

15 lines
383 B
Ruby
Raw Normal View History

2020-07-28 23:09:34 +05:30
# frozen_string_literal: true
module Packages
module Composer
class Metadatum < ApplicationRecord
self.table_name = 'packages_composer_metadata'
self.primary_key = :package_id
belongs_to :package, -> { where(package_type: :composer) }, inverse_of: :composer_metadatum
validates :package, :target_sha, :composer_json, presence: true
end
end
end