b6755a6ace
清空项目,需求有大调整,后续再建骨架
2026-04-30 14:57:34 +08:00
aaf398196a
feat(permission): seed 154 PermissionDefs + 7 builtin roles + matrix + lookups + tenant auto-seed
...
- data migration apps/permission_def/0002_seed_permission_defs: 154 PermissionDef rows in public schema
- service apps.permission.services.seed_default_roles: 7 builtin roles + 154x7 RolePermission matrix
- service apps.setting.services.seed_default_lookups: LookupGroup/LookupItem defaults per DATA_MODEL_SETTING.md sec 2.3
- apps.tenant.signals: post_save Tenant handler auto-seeds new tenants inside schema_context, errors logged not raised
- apps.tenant.apps.ready() registers the signal
2026-04-30 12:58:34 +08:00
b9245cd891
feat(permission): extract PermissionDef into shared apps.permission_def
...
Move PermissionDef out of TENANT_APPS into a new SHARED app so all
tenants read a single global definition table in public schema.
- new app apps.permission_def (label=fonrey_permission_def)
- db_table preserved as permission_defs (no rename)
- FK refs updated: fonrey_permission.PermissionDef -> fonrey_permission_def.PermissionDef
- migrations: permission_def/0001_initial creates table in public,
permission/0004 drops the now-orphan table from tenant schemas
2026-04-30 12:45:44 +08:00
5dedd19c0a
docker file & docker compose change
2026-04-30 12:38:32 +08:00
d00ff12ba0
feat(migrations): add Phase 4.0+4.1 verbose_name/help_text migrations
...
Generated by manage.py makemigrations after Phase 4.0 (model Meta verbose_name)
and Phase 4.1 (field-level verbose_name/help_text) were committed across all 9 apps.
Field-meta only (Alter field on Meta options); no schema changes.
2026-04-30 09:47:44 +08:00
8faa68b615
feat(tenant): add Chinese verbose_name/help_text to tenant models (Phase 4.1 part 9/9)
2026-04-30 09:32:25 +08:00
e3b26cee05
feat(region): add Chinese verbose_name/help_text to region models (Phase 4.1 part 8/9)
2026-04-30 09:31:36 +08:00
289ec43265
feat(setting): add Chinese verbose_name/help_text to setting models (Phase 4.1 part 7/9)
2026-04-30 09:30:35 +08:00
9ef6eb6369
feat(permission): add Chinese verbose_name/help_text to permission models (Phase 4.1 part 6/9)
2026-04-30 09:29:21 +08:00
b57070f3b3
feat(account): add Chinese verbose_name and help_text to all account fields (Phase 4.1 part 5/9)
...
Sync DATA_MODEL_LOGIN.md field-level Chinese annotations to Django
models across 4 account tables (UserAccount, LoginAttempt,
PasswordResetToken, PasswordHistory).
2026-04-30 09:26:27 +08:00
f185127335
feat(org): add Chinese verbose_name and help_text to all org fields (Phase 4.1 part 4/9)
...
Sync DATA_MODEL_ORG.md field-level Chinese annotations to Django
models across 11 org tables (OrgUnit, Staff, StaffPersonalInfo,
StaffTransferLog, StaffRewardPunish, StaffAccount, StaffWorkExperience,
StaffEducation, StaffTraining, StaffFamilyMember, StaffRemark).
2026-04-30 09:25:17 +08:00
a3800bf09d
feat(complex): add Chinese verbose_name and help_text to all complex fields (Phase 4.1 part 3/9)
...
Sync DATA_MODEL_COMPLEX.md field-level Chinese annotations to Django
models across 10 complex tables (Complex, ComplexAlias,
ComplexBusinessArea, ComplexSchool, ComplexMetroStation, Building,
RoomUnit, ComplexPhoto, ComplexAttachment, ComplexPriceTrend).
2026-04-30 09:22:08 +08:00
e67b07a7c8
feat(client): add Chinese verbose_name and help_text to all client fields (Phase 4.1 part 2/9)
...
Sync DATA_MODEL_CLIENT.md field-level Chinese annotations to Django
models across 11 client tables (Client, ClientContact, ClientRequirement,
ClientSchoolPreference, ClientFavoriteFolder, ClientFolderItem,
ClientFollowLog, ClientFollowLogAttachment, ClientViewing,
ClientPropertyMatch, ClientStatusLog).
Pre-existing docstrings retained on ClientFollowLog (partitioned parent
treated as unmanaged) and ClientStatusLog (immutable audit log).
2026-04-30 09:19:58 +08:00
3638fc0302
feat(property): add Chinese verbose_name and help_text to all property fields (Phase 4.1)
...
Sync DATA_MODEL_PROPERTY.md field-level Chinese annotations to Django
models across 23 property tables. Adds verbose_name= and help_text= to
every field in core.py, follow_keys.py, listings.py, media.py.
Pre-existing partitioned-table docstrings on FollowLog/PropertyPhoto
retained (signal Django ORM treats parent as unmanaged, RunSQL managed).
2026-04-30 09:15:43 +08:00
79c3cf2924
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。
2026-04-29 19:10:38 +08:00
94d160223d
feat: complete Phase 3 scaffolding (templates, static, Docker, per-app skeletons)
...
- Per-app skeleton completion: property/client/setting now have services/,
tasks.py, views.py, urls.py, serializers.py, templates/<app>/, tests/
- admin.py added to all 10 apps (per spec §2.108 / §17.3)
- Top-level templates/: base.html, layouts/{app,auth}.html, components/
{topbar,sidebar,pagination,toast,modal,empty-state}.html, errors/
{403,404,500}.html
- static/: css/main.css (Tailwind entry), js/main.js (HTMX toast +
CSRF wiring per §7.4), vendor/.gitkeep
- tailwind.config.js: Primary teal + neutral slate + semantic colors,
Inter font stack, z-60/z-70, shadow-xs, slide-in-right animation per
UI_SYSTEM §2.7/§10.1
- package.json: tailwindcss-only build/watch
- Dockerfile + docker-compose.yml (6 services: web/db/redis/celery/
celery-beat/tailwind) + docker-compose.prod.yml + Makefile
- tests/ root: conftest.py with TenantClient fixture per §720,
integration/{property,client,release}/, e2e/, schemathesis skeleton
- Removed empty apps/tenant/models/ (tenant uses models.py per §17.1)
Validated: manage.py check passes; tree matches spec §2 exactly.
2026-04-29 17:45:22 +08:00
Sisyphus
ed40de4050
feat(client,setting): complete Phase 2 with partitioned client_follow_logs
...
- apps/client (11 models): Client, ClientContact, ClientRequirement,
ClientSchoolPreference, ClientFollowLog (partitioned),
ClientFollowLogAttachment, ClientViewing, ClientPropertyMatch,
ClientStatusLog, ClientFavoriteFolder, ClientFolderItem
- apps/client/0002 RunSQL: PARTITION BY RANGE(created_at) for
client_follow_logs + monthly partitions + default; triggers
update_client_last_follow + update_client_viewing_progress;
partial unique index on client_no WHERE deleted_at IS NULL
- apps/setting (4 models): LookupGroup, LookupItem, TenantSetting,
FieldRequirementRule (tenant schema only per spec)
manage.py check green; all 9 Phase 2 apps complete.
2026-04-29 17:33:58 +08:00
5b55dda367
feat(property): add 23-table property module with partitioned follow_logs and property_photos
2026-04-29 17:27:15 +08:00
c57462f6d1
feat(complex): add apps.complex with 10 models and full-text search
...
- 10 models: Complex, ComplexAlias, ComplexBusinessArea, ComplexSchool, ComplexMetroStation, Building, RoomUnit, ComplexPhoto, ComplexAttachment, ComplexPriceTrend
- RunSQL migration: pg_trgm extension, gin_trgm_ops indexes, tsvector triggers for complex search_vector (from name/alias/address)
- Optimistic locking via version field on Complex
- 4 lock flags (lock_building/room/info/standard_room) per spec
- Adds ComplexPropertyUsageType + ComplexBuildingStructure enums
- manage.py check passes
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
2026-04-29 17:19:01 +08:00
9a7d06b34e
feat: scaffold Django multi-tenant project with 5 of 9 apps
...
Phase 1 scaffolding: config/, core/, base models, AES-256-GCM phone encryption, enums mirror
apps.tenant: Tenant + Domain (django-tenants)
apps.org: 11 models (OrgUnit hierarchy, Staff, audit logs)
apps.account: 4 models (UserAccount as AUTH_USER_MODEL, login/password tracking)
apps.permission: 7 models (RBAC + overrides + datascope + append-only changelog)
apps.region: 5 models (District, BusinessArea, MetroLine, MetroStation, School)
All migrations generated, manage.py check passes
2026-04-29 17:01:55 +08:00
61535a53c2
清空,重构
2026-04-28 13:15:55 +08:00
381079bbf3
修改
2026-04-28 13:15:28 +08:00
4aba6dfa77
Initialize Fonrey Django multi-tenant project skeleton
...
Set up the required directory layout, app scaffolding, core settings, templates, static assets, and Docker/Tailwind tooling to establish a standardized development baseline.
2026-04-26 17:12:09 +08:00