Files
pos-system/services/_template/prisma/schema.prisma
Ho Ngoc Hai 935c253c7e feat: upgrade Phase 1 dependencies to latest versions
- Upgrade TypeScript 5.3.3 → 5.9.3
- Upgrade @types/node to 25.0.3 (all workspaces)
- Upgrade Prisma 5.22.0 → 7.2.0 (BREAKING)
- Upgrade @prisma/client 5.9.1 → 7.2.0 (BREAKING)

BREAKING CHANGES:
- Prisma 7 requires prisma.config.ts instead of url in datasource
- Migrated to Neon adapter with @neondatabase/serverless
- Added @prisma/adapter-neon for Prisma 7 compatibility
- Removed url property from schema.prisma datasource blocks
- Created prisma.config.ts for iam-service and _template

All services tested and typecheck passes
2026-01-07 17:20:34 +07:00

48 lines
1.4 KiB
Plaintext

// EN: Prisma schema for microservice template
// VI: Schema Prisma cho template microservice
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
}
// EN: Feature model - represents a configurable feature in the system
// VI: Model Feature - đại diện cho một tính năng có thể cấu hình trong hệ thống
model Feature {
// EN: Primary key / Khóa chính
id String @id @default(cuid())
// EN: Feature name (unique identifier) / Tên tính năng (mã định danh duy nhất)
name String @unique
// EN: Human-readable title / Tiêu đề dễ đọc
title String?
// EN: Detailed description / Mô tả chi tiết
description String?
// EN: Feature configuration as JSON / Cấu hình tính năng dạng JSON
config Json?
// EN: Whether the feature is enabled / Tính năng có được bật không
enabled Boolean @default(true)
// EN: Feature version for migration purposes / Phiên bản tính năng cho mục đích migration
version String? @default("1.0.0")
// EN: Timestamps / Dấu thời gian
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
// EN: Optional tags for categorization / Tags tùy chọn để phân loại
tags String[]
// EN: Metadata for extensibility / Metadata để mở rộng
metadata Json?
@@map("features")
}