2020-07-08 23:09:01 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module API
|
|
|
|
module Entities
|
|
|
|
class PackageFile < Grape::Entity
|
|
|
|
expose :id, :package_id, :created_at
|
|
|
|
expose :file_name, :size
|
2021-04-30 08:12:30 -04:00
|
|
|
expose :file_md5, :file_sha1, :file_sha256
|
2020-11-16 19:09:16 -05:00
|
|
|
expose :pipelines, if: ->(package_file) { package_file.pipelines.present? }, using: Package::Pipeline
|
2020-07-08 23:09:01 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|