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

@@ -0,0 +1,105 @@
# Generated by Django 4.2.16 on 2026-04-29 11:07
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('fonrey_property', '0002_partitions_and_triggers'),
]
operations = [
migrations.AlterModelOptions(
name='commission',
options={'verbose_name': '委托管理', 'verbose_name_plural': '委托管理'},
),
migrations.AlterModelOptions(
name='commissionattachment',
options={'verbose_name': '委托附件', 'verbose_name_plural': '委托附件'},
),
migrations.AlterModelOptions(
name='fieldsurvey',
options={'verbose_name': '实勘记录', 'verbose_name_plural': '实勘记录'},
),
migrations.AlterModelOptions(
name='followlog',
options={'managed': False, 'verbose_name': '房源跟进日志', 'verbose_name_plural': '房源跟进日志'},
),
migrations.AlterModelOptions(
name='followlogattachment',
options={'verbose_name': '跟进附件', 'verbose_name_plural': '跟进附件'},
),
migrations.AlterModelOptions(
name='followlogrecording',
options={'verbose_name': '跟进录音', 'verbose_name_plural': '跟进录音'},
),
migrations.AlterModelOptions(
name='keyattachment',
options={'verbose_name': '钥匙附件', 'verbose_name_plural': '钥匙附件'},
),
migrations.AlterModelOptions(
name='listinghistory',
options={'verbose_name': '挂牌历史', 'verbose_name_plural': '挂牌历史'},
),
migrations.AlterModelOptions(
name='numberholderapproval',
options={'verbose_name': '号码方审批', 'verbose_name_plural': '号码方审批'},
),
migrations.AlterModelOptions(
name='pricechange',
options={'verbose_name': '调价记录', 'verbose_name_plural': '调价记录'},
),
migrations.AlterModelOptions(
name='property',
options={'verbose_name': '房源', 'verbose_name_plural': '房源'},
),
migrations.AlterModelOptions(
name='propertyattachment',
options={'verbose_name': '房源附件', 'verbose_name_plural': '房源附件'},
),
migrations.AlterModelOptions(
name='propertycertificate',
options={'verbose_name': '房源产证', 'verbose_name_plural': '房源产证'},
),
migrations.AlterModelOptions(
name='propertycompleteness',
options={'verbose_name': '房源完整度', 'verbose_name_plural': '房源完整度'},
),
migrations.AlterModelOptions(
name='propertycontact',
options={'verbose_name': '房源联系人', 'verbose_name_plural': '房源联系人'},
),
migrations.AlterModelOptions(
name='propertyfavorite',
options={'verbose_name': '房源收藏', 'verbose_name_plural': '房源收藏'},
),
migrations.AlterModelOptions(
name='propertykey',
options={'verbose_name': '房源钥匙', 'verbose_name_plural': '房源钥匙'},
),
migrations.AlterModelOptions(
name='propertymarketing',
options={'verbose_name': '房源营销信息', 'verbose_name_plural': '房源营销信息'},
),
migrations.AlterModelOptions(
name='propertyphoto',
options={'managed': False, 'verbose_name': '房源图片', 'verbose_name_plural': '房源图片'},
),
migrations.AlterModelOptions(
name='propertyprotection',
options={'verbose_name': '房源保护期', 'verbose_name_plural': '房源保护期'},
),
migrations.AlterModelOptions(
name='propertytag',
options={'verbose_name': '房源标签', 'verbose_name_plural': '房源标签'},
),
migrations.AlterModelOptions(
name='propertytagrelation',
options={'verbose_name': '房源标签关联', 'verbose_name_plural': '房源标签关联'},
),
migrations.AlterModelOptions(
name='surveyphoto',
options={'verbose_name': '实勘照片', 'verbose_name_plural': '实勘照片'},
),
]

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 = "房源保护期"

View File

@@ -44,6 +44,8 @@ class FollowLog(models.Model):
class Meta:
db_table = "follow_logs"
verbose_name = "房源跟进日志"
verbose_name_plural = "房源跟进日志"
managed = False
unique_together = (("id", "created_at"),)
@@ -61,6 +63,8 @@ class FollowLogAttachment(UUIDPrimaryKeyModel):
class Meta:
db_table = "follow_log_attachments"
verbose_name = "跟进附件"
verbose_name_plural = "跟进附件"
indexes = [models.Index(fields=["follow_log_id"], name="idx_fla_log")]
@@ -72,6 +76,8 @@ class FollowLogRecording(UUIDPrimaryKeyModel):
class Meta:
db_table = "follow_log_recordings"
verbose_name = "跟进录音"
verbose_name_plural = "跟进录音"
indexes = [models.Index(fields=["follow_log_id"], name="idx_flr_log")]
@@ -114,6 +120,8 @@ class PropertyKey(UUIDPrimaryKeyModel):
class Meta:
db_table = "property_keys"
verbose_name = "房源钥匙"
verbose_name_plural = "房源钥匙"
indexes = [models.Index(fields=["property"], name="idx_pk_property")]
@@ -127,4 +135,6 @@ class KeyAttachment(UUIDPrimaryKeyModel):
class Meta:
db_table = "key_attachments"
verbose_name = "钥匙附件"
verbose_name_plural = "钥匙附件"
indexes = [models.Index(fields=["key"], name="idx_ka_key")]

View File

@@ -44,6 +44,8 @@ class ListingHistory(UUIDPrimaryKeyModel):
class Meta:
db_table = "listing_histories"
verbose_name = "挂牌历史"
verbose_name_plural = "挂牌历史"
indexes = [
models.Index(fields=["property"], name="idx_lh_property"),
models.Index(fields=["property", "status"], name="idx_lh_active"),
@@ -69,6 +71,8 @@ class PriceChange(UUIDPrimaryKeyModel):
class Meta:
db_table = "price_changes"
verbose_name = "调价记录"
verbose_name_plural = "调价记录"
indexes = [
models.Index(fields=["property"], name="idx_pchg_property"),
models.Index(fields=["property", "-changed_at"], name="idx_pchg_time"),
@@ -130,6 +134,8 @@ class Commission(TimeStampedModel):
class Meta:
db_table = "commissions"
verbose_name = "委托管理"
verbose_name_plural = "委托管理"
indexes = [
models.Index(fields=["property"], name="idx_commissions_property"),
models.Index(fields=["property", "status"], name="idx_commissions_active"),
@@ -151,6 +157,8 @@ class CommissionAttachment(UUIDPrimaryKeyModel):
class Meta:
db_table = "commission_attachments"
verbose_name = "委托附件"
verbose_name_plural = "委托附件"
indexes = [models.Index(fields=["commission"], name="idx_ca_commission")]
@@ -188,6 +196,8 @@ class NumberHolderApproval(UUIDPrimaryKeyModel):
class Meta:
db_table = "number_holder_approvals"
verbose_name = "号码方审批"
verbose_name_plural = "号码方审批"
indexes = [
models.Index(fields=["status"], name="idx_nha_status"),
models.Index(fields=["property"], name="idx_nha_property"),

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"),
]