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:
@@ -0,0 +1,29 @@
|
||||
# Generated by Django 4.2.16 on 2026-04-29 11:07
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('setting', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='fieldrequirementrule',
|
||||
options={'verbose_name': '字段必填规则', 'verbose_name_plural': '字段必填规则'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='lookupgroup',
|
||||
options={'verbose_name': '查找组', 'verbose_name_plural': '查找组'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='lookupitem',
|
||||
options={'verbose_name': '查找项', 'verbose_name_plural': '查找项'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='tenantsetting',
|
||||
options={'verbose_name': '租户设置', 'verbose_name_plural': '租户设置'},
|
||||
),
|
||||
]
|
||||
@@ -14,6 +14,8 @@ class LookupGroup(UUIDPrimaryKeyModel):
|
||||
|
||||
class Meta:
|
||||
db_table = "lookup_groups"
|
||||
verbose_name = "查找组"
|
||||
verbose_name_plural = "查找组"
|
||||
constraints = [
|
||||
models.UniqueConstraint(
|
||||
fields=["module", "key"], name="uq_lookup_groups_module_key"
|
||||
@@ -42,6 +44,8 @@ class LookupItem(UUIDPrimaryKeyModel):
|
||||
|
||||
class Meta:
|
||||
db_table = "lookup_items"
|
||||
verbose_name = "查找项"
|
||||
verbose_name_plural = "查找项"
|
||||
constraints = [
|
||||
models.UniqueConstraint(
|
||||
fields=["group", "value"], name="uq_lookup_items_group_value"
|
||||
|
||||
@@ -32,6 +32,8 @@ class TenantSetting(UUIDPrimaryKeyModel):
|
||||
|
||||
class Meta:
|
||||
db_table = "tenant_settings"
|
||||
verbose_name = "租户设置"
|
||||
verbose_name_plural = "租户设置"
|
||||
constraints = [
|
||||
models.UniqueConstraint(
|
||||
fields=["category", "key"], name="uq_tenant_settings_cat_key"
|
||||
@@ -61,6 +63,8 @@ class FieldRequirementRule(UUIDPrimaryKeyModel):
|
||||
|
||||
class Meta:
|
||||
db_table = "field_requirement_rules"
|
||||
verbose_name = "字段必填规则"
|
||||
verbose_name_plural = "字段必填规则"
|
||||
constraints = [
|
||||
models.UniqueConstraint(
|
||||
fields=["module", "entity_type", "trade_status", "field_key"],
|
||||
|
||||
Reference in New Issue
Block a user