forked from hazem/yslootahrobotics
- Removed the previous demo payment system and implemented a real integration with Stripe for handling payments. - Added new API routes for creating payment intents and handling webhooks from Stripe. - Updated the database schema to include an Order model for storing payment details. - Enhanced the admin page to manage pricing items, including the ability to upload 3D models. - Introduced a settings management feature for the admin panel, allowing for dynamic key-value pairs. - Improved the RobotModel component to support dynamic attire based on uploaded models. - Added error handling and validation for file uploads and settings management.
48 lines
1.1 KiB
Plaintext
48 lines
1.1 KiB
Plaintext
generator client {
|
|
provider = "prisma-client"
|
|
output = "../src/generated/prisma"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "sqlite"
|
|
}
|
|
|
|
model AdminUser {
|
|
id String @id @default(cuid())
|
|
username String @unique
|
|
passwordHash String
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
}
|
|
|
|
model AppSettings {
|
|
key String @id
|
|
value String
|
|
updatedAt DateTime @updatedAt
|
|
}
|
|
|
|
model Snapshot {
|
|
paymentIntentId String @id
|
|
imageData String
|
|
createdAt DateTime @default(now())
|
|
}
|
|
|
|
model Order {
|
|
id String @id @default(cuid())
|
|
paymentIntentId String @unique
|
|
amount Int
|
|
currency String @default("aed")
|
|
status String
|
|
customerName String?
|
|
customerEmail String?
|
|
customerPhone String?
|
|
customerAddress String?
|
|
customerCity String?
|
|
customerCountry String?
|
|
customerPostalCode String?
|
|
persona String?
|
|
color String?
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
}
|