TS Lint / ESLint (push) Successful in 1m0s
Python Lint CI / ty (push) Successful in 1m6s
Python Lint CI / ruff (push) Successful in 1m7s
Python Lint CI / ruff-format-check (push) Successful in 1m12s
TS Lint / Oxlint (push) Failing after 4m55s
TS Lint / TypeScript (push) Successful in 5m15s
16 lines
442 B
Python
16 lines
442 B
Python
import typing
|
|
|
|
import tortoise.models
|
|
|
|
|
|
class AbstractModel(tortoise.models.Model):
|
|
id = tortoise.fields.UUIDField(primary_key=True)
|
|
created_at = tortoise.fields.DatetimeField(auto_now_add=True, null=False)
|
|
updated_at = tortoise.fields.DatetimeField(auto_now=True, null=False)
|
|
|
|
class Meta:
|
|
abstract = True
|
|
|
|
def serialize(self) -> dict[str, typing.Any]:
|
|
return dict(self) # ty:ignore[no-matching-overload]
|