summaryrefslogtreecommitdiff
path: root/app/models/ci/sources/pipeline.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/ci/sources/pipeline.rb')
-rw-r--r--app/models/ci/sources/pipeline.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/app/models/ci/sources/pipeline.rb b/app/models/ci/sources/pipeline.rb
new file mode 100644
index 00000000000..718a163d70f
--- /dev/null
+++ b/app/models/ci/sources/pipeline.rb
@@ -0,0 +1,14 @@
+module Ci
+ module Sources
+ class Pipeline < ActiveRecord::Base
+ self.table_name = "ci_sources_pipelines"
+
+ belongs_to :project, class_name: Project
+ belongs_to :pipeline, class_name: Ci::Pipeline
+
+ belongs_to :source_project, class_name: Project, foreign_key: :source_project_id
+ belongs_to :source_job, class_name: Ci::Build, foreign_key: :source_job_id
+ belongs_to :source_pipeline, class_name: Ci::Pipeline, foreign_key: :source_pipeline_id
+ end
+ end
+end