Перейти к содержимому

Simplify Project Schema

The Project model is overloaded with budget-related fields that will be moved to a separate table in the future. Currently, creating a project requires filling in too many fields.

Simplify the Project model to require only: title, description, category (optional). Remove budget and deadline fields entirely from the schema.

Remove from Project model:

  • budgetType (ProjectBudgetType enum)
  • budgetMin (Decimal)
  • budgetMax (Decimal)
  • currency (String)
  • deadline (DateTime)

Change:

  • category from required to optional (nullable)

Remove enum:

  • ProjectBudgetType (FIXED, HOURLY)

Required: title (3-255 chars), description (min 3 chars) Optional: category (ProjectCategoryType)

All optional: title, description, category

Fields: id, title, description, category (nullable), status, customerId, createdAt, updatedAt

  1. apps/core-api/prisma/schema.prisma - remove fields, make category nullable, remove ProjectBudgetType enum
  2. libs/apis/providers/project-api/data-access/src/lib/dtos/project.dto.ts - simplify all DTOs
  3. libs/apis/providers/project-api/features/project/src/lib/project.service.ts - remove budget-related logic
  4. Prisma migration - DROP COLUMNs
  • Project controller (endpoints stay the same)
  • Status transitions
  • Customer guard / auth
  • WalriderThread integration