moved some more models out of individual classes

This commit is contained in:
Frederik Jacobsen 2025-03-08 23:45:21 +01:00
parent 6f451499c0
commit eb40b5e91d
4 changed files with 19 additions and 18 deletions

View File

@ -8,7 +8,7 @@ import sqlparse
from models.DatabaseConfig import DatabaseConfig
from models.DatabaseType import DatabaseType
from keepass.keepass import KeePass
from keepass.Keepass import KeePass
from models.ExportType import ExportType
from models.Municipality import Municipality

View File

@ -1,25 +1,10 @@
import getpass
import logging
from dataclasses import dataclass
from pykeepass import PyKeePass
from models.KeePassConfig import KeePassConfig
@dataclass
class KeePassEntry:
def __init__(self, name: str, password: str):
self._name = name
self._password = password
@property
def password(self) -> str:
return self._password
@property
def name(self) -> str:
return self._name
from models.KeePassEntry import KeePassEntry
class KeePass:

View File

@ -1,6 +1,6 @@
from config.Config import Config
from database.db_adapter import DBAdapter
from keepass.keepass import KeePass
from keepass.Keepass import KeePass
from logger.logger import init_logger
from models.Municipality import Municipality

16
models/KeePassEntry.py Normal file
View File

@ -0,0 +1,16 @@
from dataclasses import dataclass
@dataclass
class KeePassEntry:
def __init__(self, name: str, password: str):
self._name = name
self._password = password
@property
def password(self) -> str:
return self._password
@property
def name(self) -> str:
return self._name