mirror of
https://github.com/fastapi-practices/fastapi_best_architecture.git
synced 2025-08-26 13:26:04 +08:00
Fix the code generation schema template (#706)
This commit is contained in:
@ -10,7 +10,7 @@ from backend.common.schema import SchemaBase
|
|||||||
class {{ schema_name }}SchemaBase(SchemaBase):
|
class {{ schema_name }}SchemaBase(SchemaBase):
|
||||||
"""{{ doc_comment }}基础模型"""
|
"""{{ doc_comment }}基础模型"""
|
||||||
{% for model in models %}
|
{% for model in models %}
|
||||||
{{ model.name }}: {% if model.nullable %}{{ model.pd_type }} | None = Field(None, description='{{ model.comment }}'){% else %}{{ model.pd_type }} = Field(description='{{ model.comment }}'){% endif %}
|
{{ model.name }}: {% if model.is_nullable %}{{ model.pd_type }} | None = Field(None, description='{{ model.comment }}'){% else %}{{ model.pd_type }} = Field(description='{{ model.comment }}'){% endif %}
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user