2014-12-04 13:59:49 +00:00
|
|
|
class SiteLog
|
|
|
|
include Mongoid::Document
|
|
|
|
include Mongoid::Timestamps
|
|
|
|
|
|
|
|
field :title
|
|
|
|
field :content
|
2014-12-05 10:08:10 +00:00
|
|
|
field :archive, type: Boolean, default: false
|
2014-12-04 13:59:49 +00:00
|
|
|
field :create_user_id, type: BSON::ObjectId
|
|
|
|
field :update_user_id, type: BSON::ObjectId
|
|
|
|
|
|
|
|
belongs_to :registered_site
|
|
|
|
has_many :site_log_files, autosave: true, dependent: :destroy
|
|
|
|
accepts_nested_attributes_for :site_log_files, :allow_destroy => true
|
|
|
|
|
|
|
|
end
|