mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-24 13:37:13 +00:00
- Added a "Start Here" section in both English and Chinese README files to guide new users on running the project locally and exploring its features. - Introduced backend conventions for date and serialization handling, clarifying the use of Pydantic v2 and PostgreSQL. - Updated the "Quick Start" section with detailed steps for first-time local setup, including environment requirements and backend setup instructions. - Improved overall structure and clarity of documentation to facilitate better understanding for developers and contributors.
19 lines
519 B
Python
19 lines
519 B
Python
|
|
from sqlalchemy import String
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
from app.core.base_model import ModelMixin, UserMixin
|
|
|
|
|
|
class Demo01Model(ModelMixin, UserMixin):
|
|
"""
|
|
示例表 - 涵盖大多数常用数据类型
|
|
"""
|
|
|
|
__tablename__: str = "gen_demo01"
|
|
__table_args__: dict[str, str] = {"comment": "示例1表"}
|
|
__loader_options__: list[str] = ["created_by", "updated_by"]
|
|
|
|
# 字符串类型
|
|
name: Mapped[str] = mapped_column(String(64), nullable=False, comment="名称")
|