Files
old-krovovi-kalkulator/helix/constants/inverter_brand.py
2017-11-07 09:23:57 +01:00

26 lines
478 B
Python

from enum import IntEnum
class InverterBrand(IntEnum):
SMA = 1
DELTA = 2
@property
def label(self):
return {
self.SMA: 'SMA',
self.DELTA: 'Delta',
}[self]
@classmethod
def default_value(cls):
return cls.SMA.value
@classmethod
def all(cls):
return [cls.SMA, cls.DELTA]
@classmethod
def dict(cls):
return {cls.SMA.label: cls.SMA.value, cls.DELTA.label: cls.DELTA.value}