|
|
|
@@ -39,12 +39,14 @@ |
|
|
|
# pm_issue_type :integer |
|
|
|
# time_scale :decimal(10, 2) default("0.00") |
|
|
|
# child_count :integer default("0") |
|
|
|
# changer_id :integer |
|
|
|
# |
|
|
|
# Indexes |
|
|
|
# |
|
|
|
# index_issues_on_assigned_to_id (assigned_to_id) |
|
|
|
# index_issues_on_author_id (author_id) |
|
|
|
# index_issues_on_category_id (category_id) |
|
|
|
# index_issues_on_changer_id (changer_id) |
|
|
|
# index_issues_on_created_on (created_on) |
|
|
|
# index_issues_on_fixed_version_id (fixed_version_id) |
|
|
|
# index_issues_on_priority_id (priority_id) |
|
|
|
@@ -90,6 +92,7 @@ class Issue < ApplicationRecord |
|
|
|
has_many :attach_pull_requests, through: :pull_attached_issues, source: :pull_request |
|
|
|
# PM 关联工作项目 |
|
|
|
has_many :pm_links, as: :linkable, dependent: :destroy |
|
|
|
belongs_to :changer, class_name: 'User', foreign_key: :changer_id, optional: true |
|
|
|
|
|
|
|
scope :issue_includes, ->{includes(:user)} |
|
|
|
scope :issue_many_includes, ->{includes(journals: :user)} |
|
|
|
|