14 lines
376 B
Ruby
14 lines
376 B
Ruby
class SiteLog
|
|
include Mongoid::Document
|
|
include Mongoid::Timestamps
|
|
|
|
field :title
|
|
field :content
|
|
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 |