Automated Action a8270cc5cb Complete rebuild: Node.js/Express/TypeScript WhatsApp AI task scheduling service
- Replaced Python/FastAPI implementation with Node.js/Express/TypeScript
- Added Prisma ORM with SQLite database
- Implemented JWT authentication with bcrypt password hashing
- Created comprehensive task management API with CRUD operations
- Integrated Twilio WhatsApp Business API for notifications
- Added OpenAI integration for intelligent task scheduling
- Implemented automated background jobs with node-cron
- Added comprehensive error handling and validation
- Structured logging with Winston
- Complete API documentation and setup instructions

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-27 16:50:54 +00:00

59 lines
1.6 KiB
Plaintext

generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
model User {
id Int @id @default(autoincrement())
email String @unique
password String
fullName String? @map("full_name")
phoneNumber String? @map("phone_number")
whatsappNumber String? @map("whatsapp_number")
isActive Boolean @default(true) @map("is_active")
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
tasks Task[]
@@map("users")
}
model Task {
id Int @id @default(autoincrement())
title String
description String?
status TaskStatus @default(PENDING)
priority TaskPriority @default(MEDIUM)
dueDate DateTime? @map("due_date")
scheduledAt DateTime? @map("scheduled_at")
aiSuggestedTime DateTime? @map("ai_suggested_time")
whatsappReminderSent Boolean @default(false) @map("whatsapp_reminder_sent")
whatsappCompletionSent Boolean @default(false) @map("whatsapp_completion_sent")
ownerId Int @map("owner_id")
createdAt DateTime @default(now()) @map("created_at")
updatedAt DateTime @updatedAt @map("updated_at")
completedAt DateTime? @map("completed_at")
owner User @relation(fields: [ownerId], references: [id], onDelete: Cascade)
@@map("tasks")
}
enum TaskStatus {
PENDING
IN_PROGRESS
COMPLETED
CANCELLED
}
enum TaskPriority {
LOW
MEDIUM
HIGH
URGENT
}