|
|
|
@ -76,19 +76,7 @@ class User < Principal
|
|
|
|
|
has_one :api_token, :class_name => 'Token', :conditions => "action='api'"
|
|
|
|
|
belongs_to :auth_source
|
|
|
|
|
|
|
|
|
|
# 添加用户关注项目功能 fq
|
|
|
|
|
has_many :projects, :through => :watchers_of_projects
|
|
|
|
|
has_many :watchers_of_projects, :class_name => 'WatchersOfProjects'
|
|
|
|
|
# end of
|
|
|
|
|
|
|
|
|
|
# 添加关注用户功能 fq
|
|
|
|
|
has_many :watchers_of_users
|
|
|
|
|
# end of
|
|
|
|
|
|
|
|
|
|
#添加用户留言功能 fq
|
|
|
|
|
has_many :messages_for_users
|
|
|
|
|
#end
|
|
|
|
|
#####fq
|
|
|
|
|
#####fq
|
|
|
|
|
has_many :jours, :class_name => 'JournalsForMessage', :dependent => :destroy
|
|
|
|
|
has_many :bids, :foreign_key => 'author_id', :dependent => :destroy
|
|
|
|
|
has_many :journals_for_messages, :as => :jour, :dependent => :destroy
|
|
|
|
|