mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-24 05:35:46 +08:00
新增: 合并请求审核model
This commit is contained in:
27
app/models/review.rb
Normal file
27
app/models/review.rb
Normal file
@@ -0,0 +1,27 @@
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: reviews
|
||||
#
|
||||
# id :integer not null, primary key
|
||||
# issue_id :integer
|
||||
# reviewer_id :integer
|
||||
# content :text(65535)
|
||||
# commit_id :string(255)
|
||||
# status :integer default("0")
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_reviews_on_issue_id (issue_id)
|
||||
# index_reviews_on_reviewer_id (reviewer_id)
|
||||
#
|
||||
|
||||
class Review < ApplicationRecord
|
||||
|
||||
belongs_to :issue
|
||||
belongs_to :reviewer, class_name: 'User', foreign_key: :reviewer_id
|
||||
has_one :journal, dependent: :destroy
|
||||
|
||||
enum status: {common: 0, approved: 1, rejected: 2}
|
||||
end
|
||||
Reference in New Issue
Block a user