class BundleUpdateLog include Mongoid::Document include Mongoid::Timestamps field :last_time, default: Time.now field :status, type: String, default: 'running' field :last_message, type: String, default: '' field :message, type: Array, default: [] belongs_to :registered_site def last_time self['last_time'].in_time_zone.strftime('%Y/%m/%d %H:%M') end end