1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-10 21:24:20 +01:00
fab-manager/app/models/concerns/stat_concern.rb

22 lines
509 B
Ruby

# frozen_string_literal: true
# Defines the standard statistics data model.
module StatConcern
extend ActiveSupport::Concern
included do
attribute :type, String
attribute :subType, String
attribute :date, String
attribute :stat, Integer
attribute :userId, Integer
attribute :gender, String
attribute :age, Integer
attribute :group, String
# has include Elasticsearch::Persistence::Model
index_name 'stats'
document_type to_s.demodulize&.underscore
end
end