diff --git a/src/customer_attributes.py b/src/customer_attributes.py index fff9121..6680cbe 100644 --- a/src/customer_attributes.py +++ b/src/customer_attributes.py @@ -1,4 +1,4 @@ -from dataclasses import dataclass, field +from dataclasses import dataclass from typing import ClassVar from src.models import KeypadSize diff --git a/src/models.py b/src/models.py index 475cb0b..9178196 100644 --- a/src/models.py +++ b/src/models.py @@ -1,22 +1,24 @@ -from pydantic import BaseModel +from dataclasses import dataclass - -class EncipheredNKode(BaseModel): +@dataclass +class EncipheredNKode: code: str mask: str -class NKodePolicy(BaseModel): +@dataclass +class NKodePolicy: max_nkode_len: int = 10 min_nkode_len: int = 4 distinct_sets: int = 0 distinct_attributes: int = 4 byte_len: int = 2 # Todo: this should change the total number of bytes an attribute or set value can be lock_out: int = 5 - expiration: int = -1 # in seconds -1 means never expires + expiration: int = -1 # in seconds -1 means nkode never expires -class KeypadSize(BaseModel): +@dataclass +class KeypadSize: attrs_per_key: int numb_of_keys: int @@ -26,4 +28,4 @@ class KeypadSize(BaseModel): @property def is_dispersable(self) -> bool: - return self.attrs_per_key <= self.numb_of_keys + return self.attrs_per_key <= self.numb_of_keys \ No newline at end of file