新增: 合并请求评论查询is_full

This commit is contained in:
2022-08-11 15:21:11 +08:00
parent bdddd655bf
commit 13472b2311
4 changed files with 19 additions and 6 deletions

View File

@@ -42,6 +42,7 @@ class Journal < ApplicationRecord
belongs_to :resolveer, class_name: 'User', foreign_key: :resolveer_id, optional: true
has_many :journal_details, :dependent => :delete_all
has_many :attachments, as: :container, dependent: :destroy
has_many :children_journals, class_name: 'Journal', foreign_key: :parent_id
scope :journal_includes, ->{includes(:user, :journal_details, :attachments)}
scope :parent_journals, ->{where(parent_id: nil)}