Rebuild the API runtime so Dokploy serves the SMS wallet routes.
The image only runs runtime/server.cjs, which was still the pre-wallet bundle. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE "Customer" ADD COLUMN "address" TEXT;
|
||||
@@ -757,3 +757,33 @@ model ProductSuggestion {
|
||||
@@index([customerId, isActive])
|
||||
@@index([productId])
|
||||
}
|
||||
|
||||
/// یک ردیف برای تعرفه، موجودی و اطلاعات واریز پیامک
|
||||
model SmsWallet {
|
||||
id String @id @default("default")
|
||||
balanceToman Int @default(0)
|
||||
pricePerPart Int @default(250)
|
||||
blocked Boolean @default(false)
|
||||
cardNumber String @default("6219861941033817")
|
||||
sheba String @default("IR805606118280056043604401")
|
||||
accountName String @default("حسین منتظر")
|
||||
yellowThreshold Int @default(10000)
|
||||
redThreshold Int @default(1000)
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model SmsUsage {
|
||||
id String @id @default(cuid())
|
||||
parts Int
|
||||
costToman Int
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
@@index([createdAt])
|
||||
}
|
||||
|
||||
model SmsTopUp {
|
||||
id String @id @default(cuid())
|
||||
amountToman Int
|
||||
note String?
|
||||
createdAt DateTime @default(now())
|
||||
}
|
||||
|
||||
+85
-13
File diff suppressed because one or more lines are too long
+1984
-1162
File diff suppressed because one or more lines are too long
@@ -254,7 +254,7 @@ export class AgentService {
|
||||
});
|
||||
|
||||
const amounts = await this.prisma.order.findMany({
|
||||
where: { customerId },
|
||||
where: { userId: customerId },
|
||||
select: { finalAmount: true },
|
||||
});
|
||||
const total = amounts.reduce((sum, o) => sum + (o.finalAmount ?? 0), 0);
|
||||
|
||||
Reference in New Issue
Block a user