mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-16 01:35:56 +08:00
修复:合并请求评审模型修改
This commit is contained in:
@@ -32,12 +32,17 @@ class PullRequest < ApplicationRecord
|
||||
belongs_to :issue
|
||||
belongs_to :user
|
||||
belongs_to :project, counter_cache: true, touch: true
|
||||
# belongs_to :fork_project, foreign_key: :fork_project_id
|
||||
belongs_to :fork_project, class_name: 'Project', foreign_key: :fork_project_id, optional: true
|
||||
has_many :pull_request_assigns, foreign_key: :pull_request_id
|
||||
has_many :pull_request_tags, foreign_key: :pull_request_id
|
||||
has_many :project_trends, as: :trend, dependent: :destroy
|
||||
has_many :attachments, as: :container, dependent: :destroy
|
||||
has_one :gitea_pull, foreign_key: :id, primary_key: :gitea_number, class_name: 'Gitea::Pull'
|
||||
has_many :journals, :as => :journalized, :dependent => :destroy
|
||||
has_many :journal_details, through: :journals
|
||||
has_many :reviews, dependent: :destroy
|
||||
has_many :pull_requests_reviewers, dependent: :destroy
|
||||
has_many :reviewers, through: :pull_requests_reviewers
|
||||
|
||||
scope :merged_and_closed, ->{where.not(status: 0)}
|
||||
scope :opening, -> {where(status: 0)}
|
||||
|
||||
Reference in New Issue
Block a user