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

@@ -172,6 +172,8 @@ class Property(SoftDeleteModel):
class Meta:
db_table = "properties"
verbose_name = "房源"
verbose_name_plural = "房源"
constraints = [
models.CheckConstraint(
check=models.Q(floor__gt=0) & models.Q(floor__lte=models.F("total_floors")),
@@ -246,6 +248,8 @@ class PropertyContact(SoftDeleteModel):
class Meta:
db_table = "property_contacts"
verbose_name = "房源联系人"
verbose_name_plural = "房源联系人"
indexes = [
models.Index(fields=["property"], name="idx_pc_property"),
models.Index(fields=["phone_hash"], name="idx_pc_phone_hash"),
@@ -273,6 +277,8 @@ class PropertyMarketing(UUIDPrimaryKeyModel):
class Meta:
db_table = "property_marketing"
verbose_name = "房源营销信息"
verbose_name_plural = "房源营销信息"
class PropertyCertificate(UUIDPrimaryKeyModel):
@@ -297,6 +303,8 @@ class PropertyCertificate(UUIDPrimaryKeyModel):
class Meta:
db_table = "property_certificates"
verbose_name = "房源产证"
verbose_name_plural = "房源产证"
class PropertyCompleteness(UUIDPrimaryKeyModel):
@@ -319,6 +327,8 @@ class PropertyCompleteness(UUIDPrimaryKeyModel):
class Meta:
db_table = "property_completeness"
verbose_name = "房源完整度"
verbose_name_plural = "房源完整度"
class PropertyProtection(UUIDPrimaryKeyModel):
@@ -336,3 +346,5 @@ class PropertyProtection(UUIDPrimaryKeyModel):
class Meta:
db_table = "property_protections"
verbose_name = "房源保护期"
verbose_name_plural = "房源保护期"