class WolfCore::Entity

def ==(other)

def ==(other)
  id == other.id
end

def created_at

def created_at
  return if id.blank?
  timestamp = id.split('-')[1].to_i
  @created_at ||= Time.at(timestamp).utc
end

def generate_id

def generate_id
  prefix = self.class.to_s.underscore.split('/').last.downcase[0..4]
  timestamp = Time.now.utc.to_i
  uuid = SecureRandom.uuid.delete('-')[0..9]
  "#{prefix}-#{timestamp}-#{uuid}"
end