
class Type:
        ENTRY = "E"
        OUT = "O"
        AUTOMATIC_PAYMENT = "AP"
        PAID_ENTRY = "PE"

        CHOICES = (
               (ENTRY , "Entry"),
               (OUT , "Out"),
               (AUTOMATIC_PAYMENT, "Automatic Payment"),
               (PAID_ENTRY , "Paid entry")
        )


        
class RegistryClassification:
        VARIABLE = "variable"
        FIX = "fix"
        INVESTMENT = "investment"

        CHOICES = (
               (VARIABLE, "Variable"),
               (FIX , "Fix"),
               (INVESTMENT, "Investment"),
        )


class Frequency:
       NONE = 0  
       WEEK = 7  
       BIWEEK = 15  
       MONTH = 30  
       YEAR = 365  

       CHOICES = (
               (NONE, "None"),
               (WEEK , "Week"),
               (BIWEEK, "Biweek"),
               (MONTH, "Month"),
               (YEAR, "Year")
        )

       @staticmethod
       def get_frequency(frequency: int) -> int:
            valid = [f[0] for f in Frequency.CHOICES]
            return frequency if frequency in valid else 0
