Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
0fa08389
authored
Jul 23, 2025
by
Archer
Committed by
GitHub
Jul 23, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: coupoun support bank pay way (#5285)
parent
bebe2138
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
0 deletions
+40
-0
docSite/content/zh-cn/docs/development/upgrading/4111.md
+21
-0
packages/global/support/wallet/sub/coupon/constants.ts
+4
-0
packages/global/support/wallet/sub/coupon/type.d.ts
+4
-0
packages/service/support/wallet/coupon/schema.ts
+11
-0
No files found.
docSite/content/zh-cn/docs/development/upgrading/4111.md
0 → 100644
View file @
0fa08389
---
title
:
'
V4.11.1(进行中)'
description
:
'
FastGPT
V4.11.1
更新说明'
icon
:
'
upgrade'
draft
:
false
toc
:
true
weight
:
782
---
## 🚀 新增内容
## ⚙️ 优化
1.
兑换码功能支持指定对公支付模式。
## 🐛 修复
## 🔨 工具更新
packages/global/support/wallet/sub/coupon/constants.ts
0 → 100644
View file @
0fa08389
export
enum
CouponTypeEnum
{
bank
=
'bank'
,
activity
=
'activity'
}
packages/global/support/wallet/sub/coupon/type.d.ts
View file @
0fa08389
import
type
{
SubTypeEnum
,
StandardSubLevelEnum
}
from
'../constants'
;
import
type
{
SubTypeEnum
,
StandardSubLevelEnum
}
from
'../constants'
;
import
type
{
CouponTypeEnum
}
from
'./constants'
;
export
type
TeamCouponSub
=
{
export
type
TeamCouponSub
=
{
type
:
`
${
SubTypeEnum
}
`
;
// Sub type
type
:
`
${
SubTypeEnum
}
`
;
// Sub type
...
@@ -13,4 +14,7 @@ export type TeamCouponSchema = {
...
@@ -13,4 +14,7 @@ export type TeamCouponSchema = {
subscriptions
:
TeamCouponSub
[];
subscriptions
:
TeamCouponSub
[];
redeemedAt
?:
Date
;
redeemedAt
?:
Date
;
expiredAt
?:
Date
;
expiredAt
?:
Date
;
redeemedTeamId
?:
string
;
type
:
CouponTypeEnum
;
price
?:
number
;
};
};
packages/service/support/wallet/coupon/schema.ts
View file @
0fa08389
...
@@ -2,6 +2,8 @@ import { addDays } from 'date-fns';
...
@@ -2,6 +2,8 @@ import { addDays } from 'date-fns';
import
{
connectionMongo
,
getMongoModel
}
from
'../../../common/mongo'
;
import
{
connectionMongo
,
getMongoModel
}
from
'../../../common/mongo'
;
const
{
Schema
}
=
connectionMongo
;
const
{
Schema
}
=
connectionMongo
;
import
type
{
TeamCouponSchema
}
from
'@fastgpt/global/support/wallet/sub/coupon/type'
;
import
type
{
TeamCouponSchema
}
from
'@fastgpt/global/support/wallet/sub/coupon/type'
;
import
{
TeamCollectionName
}
from
'@fastgpt/global/support/user/team/constant'
;
import
{
CouponTypeEnum
}
from
'@fastgpt/global/support/wallet/sub/coupon/constants'
;
export
const
couponCollectionName
=
'team_sub_coupons'
;
export
const
couponCollectionName
=
'team_sub_coupons'
;
...
@@ -10,6 +12,11 @@ const CouponSchema = new Schema({
...
@@ -10,6 +12,11 @@ const CouponSchema = new Schema({
type
:
String
,
type
:
String
,
required
:
true
required
:
true
},
},
type
:
{
type
:
String
,
enum
:
Object
.
values
(
CouponTypeEnum
)
},
price
:
Number
,
subscriptions
:
{
subscriptions
:
{
type
:
[
Object
],
type
:
[
Object
],
required
:
true
required
:
true
...
@@ -18,6 +25,10 @@ const CouponSchema = new Schema({
...
@@ -18,6 +25,10 @@ const CouponSchema = new Schema({
type
:
Date
,
type
:
Date
,
default
:
undefined
default
:
undefined
},
},
redeemedTeamId
:
{
type
:
Schema
.
Types
.
ObjectId
,
ref
:
TeamCollectionName
},
expiredAt
:
{
expiredAt
:
{
type
:
Date
,
type
:
Date
,
default
:
()
=>
addDays
(
new
Date
(),
7
)
default
:
()
=>
addDays
(
new
Date
(),
7
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment