Welcome to mirror list, hosted at ThFree Co, Russian Federation.

project_value_stream.rb « cycle_analytics « analytics « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3eba7e87b1726e02165e5655af4d54bc540baeeb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true

class Analytics::CycleAnalytics::ProjectValueStream < ApplicationRecord
  belongs_to :project

  has_many :stages, class_name: 'Analytics::CycleAnalytics::ProjectStage'

  validates :project, :name, presence: true
  validates :name, length: { minimum: 3, maximum: 100, allow_nil: false }, uniqueness: { scope: :project_id }

  def custom?
    false
  end

  def stages
    []
  end

  def self.build_default_value_stream(project)
    new(name: Analytics::CycleAnalytics::Stages::BaseService::DEFAULT_VALUE_STREAM_NAME, project: project)
  end
end