remove pydantic from user.py

This commit is contained in:
2025-03-09 09:24:50 -05:00
parent 75787b7142
commit 0d2a524047

View File

@@ -1,5 +1,4 @@
from pydantic import BaseModel from dataclasses import dataclass, field
from src.models import EncipheredNKode from src.models import EncipheredNKode
from src.customer_attributes import CustomerAttributes from src.customer_attributes import CustomerAttributes
from src.user_cipher_keys import UserCipherKeys from src.user_cipher_keys import UserCipherKeys
@@ -7,12 +6,13 @@ from src.user_interface import UserInterface
from src.utils import xor_lists from src.utils import xor_lists
class User(BaseModel): @dataclass
class User:
username: str username: str
enciphered_passcode: EncipheredNKode enciphered_passcode: EncipheredNKode
user_keys: UserCipherKeys user_keys: UserCipherKeys
user_interface: UserInterface user_interface: UserInterface
renew: bool = False renew: bool = field(default=False)
def renew_keys(self, sets_xor: list[int], attrs_xor: list[int]): def renew_keys(self, sets_xor: list[int], attrs_xor: list[int]):
self.renew = True self.renew = True