remove pydantic from models.py

This commit is contained in:
2025-03-09 09:20:19 -05:00
parent 237d294b25
commit 94cab10aff
2 changed files with 10 additions and 8 deletions

View File

@@ -1,4 +1,4 @@
from dataclasses import dataclass, field
from dataclasses import dataclass
from typing import ClassVar
from src.models import KeypadSize

View File

@@ -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