feat(models): add Chinese verbose_name to all 74 models (Phase 4.0)

为所有 Django 模型添加 Meta.verbose_name 和 verbose_name_plural(中文表名),
覆盖 10 个 app 的全部 74 个业务模型。

Phase 4.0 范围:
- 仅 Meta 类级别中文名(用于 Django Admin、drf-spectacular OpenAPI title、错误信息)
- 字段级 verbose_name= 和 help_text= 留待 Phase 4.1(待 PM 补全 DATA_MODEL 后同步)

变更:
- 20 个 models 文件改动(每个模型 +2 行)
- 8 个 0002/0003 迁移文件(Meta options 变更)
- apps/tenant/migrations/0001_initial.py(之前漏生成的 tenant 模型迁移)

manage.py check: 0 issues。
This commit is contained in:
2026-04-29 19:10:38 +08:00
parent 94d160223d
commit 79c3cf2924
29 changed files with 594 additions and 0 deletions

View File

@@ -32,6 +32,8 @@ class FieldSurvey(UUIDPrimaryKeyModel):
class Meta:
db_table = "field_surveys"
verbose_name = "实勘记录"
verbose_name_plural = "实勘记录"
indexes = [
models.Index(fields=["property"], name="idx_fs_property"),
models.Index(fields=["property", "status"], name="idx_fs_submitted"),
@@ -52,6 +54,8 @@ class SurveyPhoto(UUIDPrimaryKeyModel):
class Meta:
db_table = "survey_photos"
verbose_name = "实勘照片"
verbose_name_plural = "实勘照片"
indexes = [
models.Index(fields=["survey"], name="idx_sp_survey"),
models.Index(fields=["survey", "category"], name="idx_sp_category"),
@@ -88,6 +92,8 @@ class PropertyPhoto(models.Model):
class Meta:
db_table = "property_photos"
verbose_name = "房源图片"
verbose_name_plural = "房源图片"
managed = False
unique_together = (("id", "created_at"),)
@@ -113,6 +119,8 @@ class PropertyAttachment(UUIDPrimaryKeyModel):
class Meta:
db_table = "property_attachments"
verbose_name = "房源附件"
verbose_name_plural = "房源附件"
indexes = [
models.Index(fields=["property"], name="idx_pa_property"),
models.Index(fields=["property", "category"], name="idx_pa_category"),
@@ -128,6 +136,8 @@ class PropertyTag(UUIDPrimaryKeyModel):
class Meta:
db_table = "property_tags"
verbose_name = "房源标签"
verbose_name_plural = "房源标签"
class PropertyTagRelation(models.Model):
@@ -140,6 +150,8 @@ class PropertyTagRelation(models.Model):
class Meta:
db_table = "property_tag_relations"
verbose_name = "房源标签关联"
verbose_name_plural = "房源标签关联"
constraints = [
models.UniqueConstraint(fields=["property", "tag"], name="uq_ptr_property_tag"),
]
@@ -160,6 +172,8 @@ class PropertyFavorite(models.Model):
class Meta:
db_table = "property_favorites"
verbose_name = "房源收藏"
verbose_name_plural = "房源收藏"
constraints = [
models.UniqueConstraint(fields=["staff", "property"], name="uq_pfav_staff_property"),
]