Update code generator plugin naming to CodeGen prefix (#1243)

This commit is contained in:
Wu Clan
2026-09-07 10:35:39 +08:00
committed by GitHub
parent e5aa1ccea7
commit ae6d165e98
29 changed files with 202 additions and 194 deletions
@@ -49,8 +49,8 @@ class Get{{ schema_name }}Detail({{ schema_name }}SchemaBase):
model_config = ConfigDict(from_attributes=True)
id: int
id: int = Field(description='主键 ID')
{% if datetime_mixin %}
created_time: datetime
updated_time: datetime | None = None
created_time: datetime = Field(description='创建时间')
updated_time: datetime | None = Field(None, description='更新时间')
{% endif %}
@@ -10,6 +10,8 @@ from backend.common.pagination import paging_data
class {{ class_name }}Service:
"""{{ doc_comment }}服务类"""
@staticmethod
async def get(*, db: AsyncSession, pk: int) -> {{ class_name }}:
"""
@@ -25,7 +27,7 @@ class {{ class_name }}Service:
return {{ table_name }}
@staticmethod
async def get_list(db: AsyncSession) -> dict[str, Any]:
async def get_list(*, db: AsyncSession) -> dict[str, Any]:
"""
获取{{ doc_comment }}列表