mirror of
https://github.com/StefBuwalda/dashboard_test.git
synced 2025-10-30 11:19:58 +00:00
24 lines
702 B
Python
24 lines
702 B
Python
from mem import db
|
|
from datetime import datetime, timezone
|
|
|
|
|
|
class log(db.Model):
|
|
id: int = db.Column(db.Integer, primary_key=True)
|
|
dateCreated: datetime = db.Column(db.DateTime, nullable=False)
|
|
|
|
def __init__(self):
|
|
super().__init__()
|
|
|
|
self.dateCreated = datetime.now(timezone.utc)
|
|
|
|
|
|
class service(db.Model):
|
|
id: int = db.Column(db.Integer, primary_key=True) # TODO: Switch to UUID
|
|
url: str = db.Column(db.String, nullable=False)
|
|
label: str = db.Column(db.String(15), nullable=False)
|
|
public_access: bool = db.Column(db.Boolean, nullable=False)
|
|
ping_method: int = db.Column(db.Integer, nullable=False)
|
|
|
|
def __init__(self):
|
|
super().__init__()
|