registered-sites/app/models/bundle_update_log.rb

13 lines
374 B
Ruby
Raw Normal View History

2020-04-01 03:44:59 +00:00
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