12 lines
453 B
Ruby
12 lines
453 B
Ruby
|
class AppManager
|
||
|
include Mongoid::Document
|
||
|
include Mongoid::Timestamps
|
||
|
|
||
|
belongs_to :user,index: true
|
||
|
|
||
|
belongs_to :managing_app, :polymorphic => true,index: true #,:class_name => 'ModuleApp',:inverse_of => :managers,:foreign_key => "user_id"
|
||
|
belongs_to :sub_managing_app, :polymorphic => true #,:class_name => 'ModuleApp',:inverse_of => :sub_manager,:foreign_key => "sub_user_id"
|
||
|
|
||
|
belongs_to :rule_creator,:class_name => 'User'
|
||
|
|
||
|
end
|