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

22 lines
507 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, Float
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