Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

range usage #15

Open
snopoke opened this issue Jan 8, 2019 · 0 comments
Open

range usage #15

snopoke opened this issue Jan 8, 2019 · 0 comments

Comments

@snopoke
Copy link
Contributor

snopoke commented Jan 8, 2019

The usage models assume that a field is consistent throughout the entire time frame but that's often not the case. In order to allow a usage field to change over time it should be possible to define what timerange a usage field is relevant for so that multiple fields can be combined to form the final field. For example:

Phase 1 SMS: Beginning to 2018-01-01
Phase 2 SMS: From 2018-02-01

usage:
  sms_phase1:
    model: 'derived_factor'
    dependant_field: 'users'
    active_range:
      lte: '20180101'
    factor: 120
  sms_phase2:
    model: 'derived_factor'
    dependant_field: 'users'
    active_range:
      gte: '20180201'
    factor: 240
  sms_total:
    model: 'derived_sum'
    dependant_fields:
      - sms_phase1
      - sms_phase2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant