Further gql improvements & added test data #181

This commit is contained in:
2025-09-27 21:57:33 +02:00
parent ada50c693e
commit d8c60defba
27 changed files with 305 additions and 88 deletions

View File

@@ -0,0 +1,30 @@
from datetime import datetime
from typing import Self
from cpl.core.typing import SerialId
from cpl.database.abc import DbModelABC
class Post(DbModelABC[Self]):
def __init__(
self,
id: int,
title: str,
content: str,
deleted: bool = False,
editor_id: SerialId | None = None,
created: datetime | None = None,
updated: datetime | None = None,
):
DbModelABC.__init__(self, id, deleted, editor_id, created, updated)
self._title = title
self._content = content
@property
def title(self) -> str:
return self._title
@property
def content(self) -> str:
return self._content