feat: improve application access and money precision
This commit is contained in:
+17
-17
@@ -269,8 +269,8 @@ model DrainageField {
|
||||
model TenantAccount {
|
||||
id String @id @default(cuid())
|
||||
tenantId String
|
||||
balanceCents Int @default(0)
|
||||
creditCents Int @default(0)
|
||||
balanceCents BigInt @default(0)
|
||||
creditCents BigInt @default(0)
|
||||
status String @default("active")
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
@@ -284,8 +284,8 @@ model AccountTransaction {
|
||||
id String @id @default(cuid())
|
||||
tenantId String
|
||||
transactionType String
|
||||
amountCents Int @default(0)
|
||||
balanceAfter Int @default(0)
|
||||
amountCents BigInt @default(0)
|
||||
balanceAfter BigInt @default(0)
|
||||
relatedType String?
|
||||
relatedId String?
|
||||
remark String?
|
||||
@@ -302,7 +302,7 @@ model BillingRule {
|
||||
code String @unique
|
||||
name String
|
||||
chargeBasis String @default("submit_success")
|
||||
unitPrice Int
|
||||
unitPrice BigInt
|
||||
status String @default("active")
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
@@ -312,7 +312,7 @@ model RechargeOrder {
|
||||
id String @id @default(cuid())
|
||||
tenantId String
|
||||
orderNo String @unique
|
||||
amountCents Int
|
||||
amountCents BigInt
|
||||
status String @default("created")
|
||||
payMethod String?
|
||||
paidAt DateTime?
|
||||
@@ -335,8 +335,8 @@ model SmsBillingRecord {
|
||||
phoneNumber String?
|
||||
contentLength Int
|
||||
billingUnits Int
|
||||
unitPrice Int
|
||||
amountCents Int
|
||||
unitPrice BigInt
|
||||
amountCents BigInt
|
||||
billingStatus String @default("estimated")
|
||||
transactionId String?
|
||||
createdAt DateTime @default(now())
|
||||
@@ -367,7 +367,7 @@ model SmsApplication {
|
||||
cmppMaxConnections Int @default(1)
|
||||
cmppWindowSize Int @default(16)
|
||||
dailyLimit Int?
|
||||
customerUnitPrice Int @default(0)
|
||||
customerUnitPrice BigInt @default(0)
|
||||
queuePriority String @default("normal")
|
||||
maxPhonesPerTask Int @default(1000000)
|
||||
templateMismatchMode String @default("reject")
|
||||
@@ -730,7 +730,7 @@ model SmsChannel {
|
||||
srcId String
|
||||
cmppVersion String @default("2.0")
|
||||
rateLimitPerSecond Int @default(100)
|
||||
unitPrice Int @default(0)
|
||||
unitPrice BigInt @default(0)
|
||||
status String @default("active")
|
||||
config Json?
|
||||
createdAt DateTime @default(now())
|
||||
@@ -1317,8 +1317,8 @@ model SmsMessageRecord {
|
||||
province String?
|
||||
content String
|
||||
billingUnits Int @default(1)
|
||||
unitPrice Int @default(0)
|
||||
amountCents Int @default(0)
|
||||
unitPrice BigInt @default(0)
|
||||
amountCents BigInt @default(0)
|
||||
queuePriority String @default("normal")
|
||||
channelId String?
|
||||
submitId String?
|
||||
@@ -1389,8 +1389,8 @@ model SmsSubmitRecord {
|
||||
sequenceId Int?
|
||||
gatewayMessageId String?
|
||||
submitStatus String @default("queued")
|
||||
costUnitPrice Int @default(0)
|
||||
costAmountCents Int @default(0)
|
||||
costUnitPrice BigInt @default(0)
|
||||
costAmountCents BigInt @default(0)
|
||||
errorCode String?
|
||||
errorMessage String?
|
||||
submittedAt DateTime?
|
||||
@@ -1439,9 +1439,9 @@ model DailyProfitReport {
|
||||
channelId String?
|
||||
sentUnits Int @default(0)
|
||||
successUnits Int @default(0)
|
||||
revenueCents Int @default(0)
|
||||
costCents Int @default(0)
|
||||
profitCents Int @default(0)
|
||||
revenueCents BigInt @default(0)
|
||||
costCents BigInt @default(0)
|
||||
profitCents BigInt @default(0)
|
||||
profitRateBps Int @default(0)
|
||||
generatedAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
Reference in New Issue
Block a user