MAJOR UPPDATE: "First Ai"
feat: add AI categorization for products and enhance user management - Integrated AI service for category suggestions in receipt import and product management. - Added premium subscription feature for users with corresponding API endpoints. - Implemented admin interface for managing pending product suggestions. - Enhanced user management to include premium status and corresponding UI updates. - Updated database schema to support new fields for premium status and product status.
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
-- AlterTable User: add isPremium field
|
||||
ALTER TABLE `User` ADD COLUMN `isPremium` BOOLEAN NOT NULL DEFAULT false;
|
||||
|
||||
-- AlterTable Product: add status field
|
||||
ALTER TABLE `Product` ADD COLUMN `status` VARCHAR(191) NOT NULL DEFAULT 'active';
|
||||
|
||||
-- CreateIndex for status on Product (optional, for filtering pending)
|
||||
CREATE INDEX `Product_status_idx` ON `Product`(`status`);
|
||||
@@ -15,6 +15,7 @@ model User {
|
||||
lastName String?
|
||||
passwordHash String
|
||||
role String @default("user")
|
||||
isPremium Boolean @default(false)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@ -33,6 +34,7 @@ model Product {
|
||||
brand String?
|
||||
canonicalName String?
|
||||
isActive Boolean @default(true)
|
||||
status String @default("active")
|
||||
deletedAt DateTime?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
Reference in New Issue
Block a user