2013-05-24 10:48:32 +08:00
|
|
|
class CategoryGroup < ActiveRecord::Base
|
|
|
|
belongs_to :category
|
|
|
|
belongs_to :group
|
2013-07-14 09:24:16 +08:00
|
|
|
|
|
|
|
def self.permission_types
|
|
|
|
@permission_types ||= Enum.new(:full, :create_post, :readonly)
|
|
|
|
end
|
|
|
|
|
2013-05-24 10:48:32 +08:00
|
|
|
end
|
|
|
|
|
2013-05-24 10:35:14 +08:00
|
|
|
# == Schema Information
|
|
|
|
#
|
|
|
|
# Table name: category_groups
|
|
|
|
#
|
2013-07-14 09:24:16 +08:00
|
|
|
# id :integer not null, primary key
|
|
|
|
# category_id :integer not null
|
|
|
|
# group_id :integer not null
|
2014-05-28 09:49:50 +08:00
|
|
|
# created_at :datetime
|
|
|
|
# updated_at :datetime
|
2013-07-14 09:24:16 +08:00
|
|
|
# permission_type :integer default(1)
|
2013-05-24 10:35:14 +08:00
|
|
|
#
|