class PullRequest < ActiveRecord::Base # status 1:创建 2:接受 3:重新打开 4:关闭 attr_accessible :gpid, :pull_request_id, :user_id, :project_id, :title validates_uniqueness_of :pull_request_id has_many :forge_messages, :class_name => 'ForgeMessage', :as => :forge_message, :dependent => :destroy end