remove pydantic from models.py
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from dataclasses import dataclass, field
|
||||
from dataclasses import dataclass
|
||||
from typing import ClassVar
|
||||
|
||||
from src.models import KeypadSize
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user