mirror of
https://github.com/Noettore/lagomareGateKeeperBot.git
synced 2025-10-15 03:26:40 +02:00
Created modules and organized code
This commit is contained in:
11
models/credential.py
Normal file
11
models/credential.py
Normal file
@@ -0,0 +1,11 @@
|
||||
class Credential:
|
||||
def __init__(self, username: str, password: str):
|
||||
self.username = username
|
||||
self.password = password
|
||||
|
||||
def to_dict(self) -> dict:
|
||||
return {"username": self.username, "password": self.password}
|
||||
|
||||
@classmethod
|
||||
def from_dict(cls, data: dict):
|
||||
return cls(data.get("username", ""), data.get("password", ""))
|
Reference in New Issue
Block a user