Browse Source

change add user memos relationships

pull/245/head
sylor_huang@126.com 5 years ago
parent
commit
ce2deaf543
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      app/models/user.rb

+ 9
- 0
app/models/user.rb View File

@@ -81,6 +81,15 @@ class User < ApplicationRecord
has_many :apply_actions, dependent: :destroy
has_many :trail_auth_apply_actions, -> { where(container_type: 'TrialAuthorization') }, class_name: 'ApplyAction'

#用户是否禁言
has_many :banned_forums, :dependent => :destroy

has_many :apply_forums, :dependent => :destroy
has_many :memos , :foreign_key => 'author_id'

#论坛的板块内容,及版主
has_many :forum_moderators, :dependent => :destroy
has_many :forum_sections, :dependent => :destroy
# has_many :attendances

# 项目


Loading…
Cancel
Save