ConoscereLinux / asso-django

An open source Django Framework to manage Events, Member and basic Accounting for an Italian Association
GNU General Public License v3.0
0 stars 3 forks source link

Membership | How TimePeriod work #63

Closed giobber closed 1 year ago

giobber commented 1 year ago

TimePeriod describe a formal timeframe of membership validation For example a membership record on 10th of February 2023 should be valid throught 1st of January 2023 to 31th of December 2023 if the formal timeframe chosen by association is the solar year for members registered in 2023

@ZompaSenior has proposed to implement it with a start and a duration (using RelativeDeltaField field)

Implementation

class TimePeriod:
    start = models.DateField(...)
    duration = models.DateField(...) 
    price = models.MoneyField(...)

Question: using end_date instead of duration

An additional end=models.DateField(...) field could be added with a validation which impose that one and only one between duration or end field should be set. Or substituting duration with end. This should permit more fine selection of date interval, but make more complex to set regular interval (yearly, bimonthly, etc, etc)...I think response is obvious

Some notes

What to do