from ..connection import DatabaseConnection class Service: def __init__(self, service_type_id: int, service_date: str): self.service_type_id = service_type_id self.service_date = service_date def save(self, db: DatabaseConnection): query = "INSERT INTO Services (ServiceTypeId, ServiceDate) VALUES (?, ?)" db.execute_query(query, (self.service_type_id, self.service_date)) @classmethod def get_all(cls, db: DatabaseConnection): query = "SELECT * FROM Services" return db.execute_query_with_return(query)