mirror of
https://github.com/Noettore/lagomareGateKeeperBot.git
synced 2025-10-14 19:16:40 +02:00
17 lines
441 B
Python
17 lines
441 B
Python
from enum import Enum
|
|
|
|
class Status(Enum):
|
|
ENABLED = 1
|
|
DISABLED = 0
|
|
|
|
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", "")) |