2021-11-17 21:48:59 +08:00
|
|
|
# == 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
|
2023-03-13 14:36:32 +08:00
|
|
|
belongs_to :issue
|
2021-11-17 21:48:59 +08:00
|
|
|
scope :claim_includes, ->{includes(:user)}
|
|
|
|
end
|