mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-16 01:35:56 +08:00
Merge pull request '易修声明功能' (#284) from starlee/forgeplus:lzx-claim-2.0 into standalone_develop
This commit is contained in:
21
app/models/claim.rb
Normal file
21
app/models/claim.rb
Normal file
@@ -0,0 +1,21 @@
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: claims
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# issue_id :integer
|
||||
# user_id :integer
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# note :text(65535)
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_claims_on_issue_id (issue_id)
|
||||
# index_claims_on_user_id (user_id)
|
||||
#
|
||||
|
||||
class Claim < ApplicationRecord
|
||||
belongs_to :user, foreign_key: :user_id
|
||||
scope :claim_includes, ->{includes(:user)}
|
||||
end
|
||||
@@ -64,6 +64,7 @@ class Issue < ApplicationRecord
|
||||
# has_many :memos
|
||||
has_many :journals, :as => :journalized, :dependent => :destroy
|
||||
has_many :journal_details, through: :journals
|
||||
has_many :claims, :dependent => :destroy
|
||||
has_many :issue_tags_relates, dependent: :destroy
|
||||
has_many :issue_tags, through: :issue_tags_relates
|
||||
has_many :issue_times, dependent: :destroy
|
||||
|
||||
Reference in New Issue
Block a user