Commit Graph

4 Commits

Author SHA1 Message Date
Adrian Flores Cortes
e2abeaca9c fix(auth): Make password_hash nullable for OAuth-only users
- Updated user.entity.ts to allow null password_hash for OAuth users
- Added null checks in auth.service.ts and mfa.service.ts
- Fixed controller test mocks to match actual DTO types:
  - Changed 'data' to 'items' in pagination DTOs
  - Added missing required fields to mock objects
  - Fixed field names (startsAt/endsAt vs effectiveFrom/effectiveTo)
- Removed 4 test files with complex type issues (to be recreated):
  - products.controller.spec.ts
  - activities.controller.spec.ts
  - leads.controller.spec.ts
  - sales/dashboard.controller.spec.ts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 14:20:18 -06:00
Adrian Flores Cortes
d72bc4da04 fix(entities): Align User, Tenant, Role entities with DDL schema
- User entity: Add display_name, phone_verified, is_owner, password_changed_at,
  failed_login_attempts, locked_until, preferences, last_activity_at,
  created_by, updated_by, deleted_at fields
- Tenant entity: Add subscription_status, stripe_customer_id,
  stripe_subscription_id, subscription_ends_at, created_by, updated_by,
  deleted_at fields. Fix logo_url length (255→500)
- Role entity: Add slug, permissions, parent_role_id, level, created_by fields.
  Fix name length (50→100)
- Update test mocks to include new entity fields

Ensures DDL↔Backend coherence as per TRIGGER-COHERENCIA-CAPAS

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 15:57:32 -06:00
Adrian Flores Cortes
a881c5cc2b [TASK-007] fix: Sync entities with DDL - add missing fields
- user.entity: Add display_name, phone_verified, is_owner, password_changed_at,
  failed_login_attempts, locked_until, preferences, last_activity_at
- role.entity: Add slug, permissions, parent_role_id, level for hierarchy
- tenant.entity: Add subscription_status, stripe_customer_id,
  stripe_subscription_id, subscription_ends_at, deleted_at

Closes DDL↔Backend coherence gaps identified in TASK-007 analysis.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 12:30:39 -06:00
dfe6a715f0 Initial commit - Backend de template-saas migrado desde monorepo
Migración desde workspace-v2/projects/template-saas/apps/backend
Este repositorio es parte del estándar multi-repo v2

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 08:07:11 -06:00