summaryrefslogtreecommitdiff
path: root/app/models/ci/pipeline_metadata.rb
blob: c96b395b45fe809b4a1c3d66c66e9a0778dc40af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

module Ci
  class PipelineMetadata < Ci::ApplicationRecord
    self.primary_key = :pipeline_id

    belongs_to :pipeline, class_name: "Ci::Pipeline", inverse_of: :pipeline_metadata
    belongs_to :project, class_name: "Project", inverse_of: :pipeline_metadata

    validates :pipeline, presence: true
    validates :project, presence: true
    validates :title, presence: true, length: { minimum: 1, maximum: 255 }
  end
end