lzh-common 0.0.16 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -1
- package/.github/workflows/deploy.yml +0 -59
- package/src/base.ts +0 -41
- package/src/category.ts +0 -24
- package/src/goods.ts +0 -39
- package/src/index.ts +0 -11
- package/src/level.ts +0 -18
- package/src/manager.ts +0 -46
- package/src/material.ts +0 -17
- package/src/order.ts +0 -96
- package/src/tenant.ts +0 -32
- package/src/transaction.ts +0 -35
- package/src/user.ts +0 -72
- package/src/withdrawal.ts +0 -38
- package/tsconfig.json +0 -15
package/package.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lzh-common",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"description": "Shared TypeScript interfaces",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "tsc"
|
|
9
9
|
},
|
|
10
|
+
"files": [
|
|
11
|
+
"./dist"
|
|
12
|
+
],
|
|
10
13
|
"author": "Your Name",
|
|
11
14
|
"license": "MIT",
|
|
12
15
|
"devDependencies": {
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
name: Publish npm Package
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main # 当推送到 main 分支时触发
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
publish:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
|
|
12
|
-
steps:
|
|
13
|
-
# 检出代码仓库
|
|
14
|
-
- name: Checkout repository
|
|
15
|
-
uses: actions/checkout@v3
|
|
16
|
-
|
|
17
|
-
# 设置 Node.js 版本
|
|
18
|
-
- name: Set up Node.js
|
|
19
|
-
uses: actions/setup-node@v3
|
|
20
|
-
with:
|
|
21
|
-
node-version: '18'
|
|
22
|
-
registry-url: 'https://registry.npmjs.org/'
|
|
23
|
-
|
|
24
|
-
# 安装依赖
|
|
25
|
-
- name: Install dependencies
|
|
26
|
-
run: npm install
|
|
27
|
-
|
|
28
|
-
# 设置 Git 用户信息,避免 "empty ident" 错误
|
|
29
|
-
- name: Set git user
|
|
30
|
-
run: |
|
|
31
|
-
git config --global user.name "github-actions[bot]"
|
|
32
|
-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
33
|
-
|
|
34
|
-
# 使用 npm token 登录
|
|
35
|
-
- name: Authenticate with npm
|
|
36
|
-
run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
|
|
37
|
-
|
|
38
|
-
# 构建项目
|
|
39
|
-
- name: Build the project
|
|
40
|
-
run: npm run build
|
|
41
|
-
|
|
42
|
-
# 自动递增版本号,更新 package.json 并创建 git 标签
|
|
43
|
-
- name: Bump version and push changes
|
|
44
|
-
env:
|
|
45
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
46
|
-
run: |
|
|
47
|
-
npm version patch -m "ci: bump version to %s"
|
|
48
|
-
|
|
49
|
-
# 设置 git 远程 URL 使用 GITHUB_TOKEN 进行身份验证
|
|
50
|
-
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/lixingjuan/lzh-common.git
|
|
51
|
-
|
|
52
|
-
# 推送代码和标签
|
|
53
|
-
git push --follow-tags
|
|
54
|
-
|
|
55
|
-
# 发布 npm 包
|
|
56
|
-
- name: Publish to npm
|
|
57
|
-
run: npm publish
|
|
58
|
-
env:
|
|
59
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/src/base.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
export type GameZoneTS = 'wx' | 'qq';
|
|
2
|
-
|
|
3
|
-
/** 订单状态 */
|
|
4
|
-
export type OrderStatusTS =
|
|
5
|
-
/** 未接单/等待接单 */
|
|
6
|
-
| 'pending'
|
|
7
|
-
/** 服务中/已接单 */
|
|
8
|
-
| 'in_progress'
|
|
9
|
-
/** 等待老板确认结单 */
|
|
10
|
-
| 'awaiting_completion'
|
|
11
|
-
/** 已结单 */
|
|
12
|
-
| 'completed';
|
|
13
|
-
|
|
14
|
-
/** 退款状态 */
|
|
15
|
-
export type RefundStatusTS =
|
|
16
|
-
/** 默认值 */
|
|
17
|
-
| 'no_refund'
|
|
18
|
-
/** 正在申请退款 */
|
|
19
|
-
| 'applying_refund'
|
|
20
|
-
/** 已经人工退款 */
|
|
21
|
-
| 'refunded_manual'
|
|
22
|
-
/** 已经原路退还 */
|
|
23
|
-
| 'refunded_original';
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
/** 分页的数据 */
|
|
28
|
-
export interface IF2ePaginationListData<T> {
|
|
29
|
-
list: T[];
|
|
30
|
-
pagination: {
|
|
31
|
-
total: number;
|
|
32
|
-
page: number;
|
|
33
|
-
pageSize: number;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/** 分页的请求参数 */
|
|
38
|
-
export interface IF2ePaginationReqData {
|
|
39
|
-
page: number;
|
|
40
|
-
pageSize: number;
|
|
41
|
-
}
|
package/src/category.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/** 分类 */
|
|
2
|
-
export interface ICategoryDB {
|
|
3
|
-
/** 数据库自增id */
|
|
4
|
-
id: number;
|
|
5
|
-
/** 分类的名称 */
|
|
6
|
-
name: string;
|
|
7
|
-
/** 用来控制该分类的顺序,越大越靠前 */
|
|
8
|
-
sequence: number;
|
|
9
|
-
/** 分类的封面url */
|
|
10
|
-
cover_url: string;
|
|
11
|
-
/** 该分类的创建时间 */
|
|
12
|
-
create_time: string;
|
|
13
|
-
/** 该分类的新增时间 */
|
|
14
|
-
update_time: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/** 返回给前端的类型 */
|
|
18
|
-
export type ICategoryF2e = ICategoryDB
|
|
19
|
-
|
|
20
|
-
/** 新增分类的请求参数 */
|
|
21
|
-
export type ICategoryReqAdd = Pick<ICategoryDB, 'name' | 'sequence' | 'cover_url'>
|
|
22
|
-
|
|
23
|
-
/** 编辑分类的请求参数 */
|
|
24
|
-
export type ICategoryReqEdit = Partial<Omit<ICategoryDB, 'create_time' | 'update_time'>> & Pick<ICategoryDB, 'id'>
|
package/src/goods.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/** 商品状态 */
|
|
2
|
-
export type GoodsStatusTS = 'active' | 'inactive';
|
|
3
|
-
|
|
4
|
-
/** 商品的详情 */
|
|
5
|
-
export interface IGoodsInfoDB {
|
|
6
|
-
id: number;
|
|
7
|
-
/** 类别 */
|
|
8
|
-
category_id: number;
|
|
9
|
-
/** 排序 */
|
|
10
|
-
sequence: number;
|
|
11
|
-
|
|
12
|
-
/** 商品名称 */
|
|
13
|
-
name: string;
|
|
14
|
-
/** 价格 */
|
|
15
|
-
price: number;
|
|
16
|
-
/** 手续费 */
|
|
17
|
-
service_charge: number;
|
|
18
|
-
|
|
19
|
-
/** 商品描述 */
|
|
20
|
-
description: string;
|
|
21
|
-
/** 封面图片 */
|
|
22
|
-
cover_url: string;
|
|
23
|
-
/** 是否允许购买 */
|
|
24
|
-
status: GoodsStatusTS;
|
|
25
|
-
|
|
26
|
-
/** 创建时间, YYYY-MM-DD HH:mm:ss */
|
|
27
|
-
create_time: string;
|
|
28
|
-
/** 更新时间, YYYY-MM-DD HH:mm:ss */
|
|
29
|
-
update_time: string;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/** 返回给前端的类型 */
|
|
33
|
-
export type IGoodsInfoF2e = IGoodsInfoDB
|
|
34
|
-
|
|
35
|
-
/** 新增商品的请求参数 */
|
|
36
|
-
export type IGoodsInfoReqAdd = Omit<IGoodsInfoF2e, 'id' | 'create_time' | 'update_time'>
|
|
37
|
-
|
|
38
|
-
/** 编辑商品的请求参数 */
|
|
39
|
-
export type IGoodsInfoReqEdit = Partial<Omit<IGoodsInfoF2e, 'create_time' | 'update_time'>> & Pick<IGoodsInfoF2e, 'id'>
|
package/src/index.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from './base'
|
|
2
|
-
export * from './category'
|
|
3
|
-
export * from './goods'
|
|
4
|
-
export * from './level'
|
|
5
|
-
export * from './manager'
|
|
6
|
-
export * from './material'
|
|
7
|
-
export * from './order'
|
|
8
|
-
export * from './tenant'
|
|
9
|
-
export * from './user'
|
|
10
|
-
export * from './withdrawal'
|
|
11
|
-
export * from './transaction'
|
package/src/level.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export interface IAssigneeLevelDB {
|
|
3
|
-
id: number;
|
|
4
|
-
/** 登记描述 */
|
|
5
|
-
name: string;
|
|
6
|
-
/** 延时时间,单位为秒 */
|
|
7
|
-
delay_second: number;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export type IAssigneeLevelF2e = IAssigneeLevelDB
|
|
11
|
-
|
|
12
|
-
/** 新增打手登记的请求参数 */
|
|
13
|
-
export type IAssigneeLevelInfoReqAdd = Omit<IAssigneeLevelF2e, 'name' | 'delay_second'>
|
|
14
|
-
|
|
15
|
-
/** 编辑打手登记的请求参数 */
|
|
16
|
-
export type IAssigneeLevelInfoReqEdit = IAssigneeLevelDB
|
|
17
|
-
|
|
18
|
-
|
package/src/manager.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/** 管理员角色类型 */
|
|
2
|
-
export type ManagerRole =
|
|
3
|
-
/** 超级用户 */
|
|
4
|
-
| 'super'
|
|
5
|
-
/** 管理用户 */
|
|
6
|
-
| 'admin'
|
|
7
|
-
/** 一般用户 */
|
|
8
|
-
| 'user';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/** 管理员, 数据库存储的类型 */
|
|
12
|
-
export interface IManagerInfoDB {
|
|
13
|
-
/** id */
|
|
14
|
-
id: number;
|
|
15
|
-
/** id */
|
|
16
|
-
tenant_id: number;
|
|
17
|
-
/** 账号 */
|
|
18
|
-
username: string;
|
|
19
|
-
/** 密码 */
|
|
20
|
-
password: string;
|
|
21
|
-
/** 权限码列表 */
|
|
22
|
-
permissions: string;
|
|
23
|
-
/** 名称 */
|
|
24
|
-
description: string;
|
|
25
|
-
/** 角色 */
|
|
26
|
-
role: ManagerRole;
|
|
27
|
-
|
|
28
|
-
/** 创建时间 */
|
|
29
|
-
create_time: string;
|
|
30
|
-
/** 更新时间 */
|
|
31
|
-
update_time: string;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/** 管理员, 吐给前端的类型 */
|
|
35
|
-
export type IManagerInfoF2e = Omit<IManagerInfoDB, 'permissions' | 'password'> & {
|
|
36
|
-
/** 权限码列表 */
|
|
37
|
-
permissions: string[];
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
/** 新增管理员的请求参数 */
|
|
41
|
-
export type IManagerInfoReqAdd = Omit<IManagerInfoF2e, 'id' | 'create_time' | 'update_time'>
|
|
42
|
-
|
|
43
|
-
/** 编辑管理员的请求参数 */
|
|
44
|
-
export type IManagerInfoReqEdit = Partial<Omit<IManagerInfoF2e, 'create_time' | 'update_time'>> & Pick<IManagerInfoF2e, 'id' | 'tenant_id'>
|
|
45
|
-
|
|
46
|
-
|
package/src/material.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/** 素材,数据库 */
|
|
2
|
-
export interface IMaterialInfoDB {
|
|
3
|
-
id: number;
|
|
4
|
-
size: number;
|
|
5
|
-
url: string;
|
|
6
|
-
name: string;
|
|
7
|
-
create_time: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/** 素材,给前端 */
|
|
11
|
-
export type IMaterialInfoF2e = IMaterialInfoDB
|
|
12
|
-
|
|
13
|
-
/** 新增素材的请求参数 */
|
|
14
|
-
export type IMaterialInfoReqAdd = Pick<IMaterialInfoF2e, 'size' | 'url' | 'name'>
|
|
15
|
-
|
|
16
|
-
/** 编辑素材的请求参数 */
|
|
17
|
-
export type IMaterialInfoReqEdit = Partial<Omit<IMaterialInfoF2e, 'create_time'>> & Pick<IMaterialInfoF2e, 'id'>
|
package/src/order.ts
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { GameZoneTS, OrderStatusTS, RefundStatusTS } from './base';
|
|
2
|
-
import { IGoodsInfoF2e } from './goods';
|
|
3
|
-
import { IUserInfoF2e } from './user';
|
|
4
|
-
|
|
5
|
-
/** 数据库存储的订单详情 */
|
|
6
|
-
export interface IOrderInfoDB {
|
|
7
|
-
/** 订单id */
|
|
8
|
-
id: number;
|
|
9
|
-
/** 商品ID,对应goods表的id字段 */
|
|
10
|
-
goods_id: number;
|
|
11
|
-
/** 用户付款的时候,商品的价格 */
|
|
12
|
-
goods_price: number;
|
|
13
|
-
|
|
14
|
-
/** 订单的状态 */
|
|
15
|
-
status: OrderStatusTS;
|
|
16
|
-
/** 付款交易单号,创建订单的时候生成 */
|
|
17
|
-
out_trade_no: string;
|
|
18
|
-
/** 用户实付款价格, 单位是元 */
|
|
19
|
-
pay_price: number;
|
|
20
|
-
|
|
21
|
-
/** 顾客的open_id */
|
|
22
|
-
customer_open_id: string | null;
|
|
23
|
-
/** 顾客游戏id */
|
|
24
|
-
customer_game_id: string;
|
|
25
|
-
/** 顾客游戏区服 */
|
|
26
|
-
customer_game_zone: GameZoneTS;
|
|
27
|
-
/** 顾客下单备注 */
|
|
28
|
-
customer_remark: string;
|
|
29
|
-
|
|
30
|
-
/** 接单的人的openId */
|
|
31
|
-
assignee_open_id: string | null;
|
|
32
|
-
/** 队友1的open_id, 不是一定有的 */
|
|
33
|
-
assignee_open_id_b1: string | null;
|
|
34
|
-
/** 队友2的open_id, 不是一定有的 */
|
|
35
|
-
assignee_open_id_b2: string | null;
|
|
36
|
-
/** 接单支持图片 */
|
|
37
|
-
support_images: string;
|
|
38
|
-
|
|
39
|
-
/** 退款相关 */
|
|
40
|
-
|
|
41
|
-
/** 退款申请状态 */
|
|
42
|
-
refund_status: RefundStatusTS;
|
|
43
|
-
/** 申请退款原因 */
|
|
44
|
-
refund_reason: string;
|
|
45
|
-
/** 申请退款备注 */
|
|
46
|
-
refund_remark: string;
|
|
47
|
-
/** 退款交易单号 */
|
|
48
|
-
refund_out_trade_no: string;
|
|
49
|
-
|
|
50
|
-
/** 支付成功的时间 */
|
|
51
|
-
pay_success_time: string;
|
|
52
|
-
/** 创建时间 */
|
|
53
|
-
create_time: string;
|
|
54
|
-
/** 更新时间 */
|
|
55
|
-
update_time: string;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export type IOrderInfoToF2e = Omit<IOrderInfoDB, 'support_images'> & {
|
|
59
|
-
support_images: { name: string; url: string }[];
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/** 给前端的order-item */
|
|
63
|
-
export type IOrderInfoReturnToF2e = {
|
|
64
|
-
id: IOrderInfoDB['id'];
|
|
65
|
-
/** 订单详情 */
|
|
66
|
-
order_detail: IOrderInfoToF2e;
|
|
67
|
-
/** 商品详情 */
|
|
68
|
-
goods_detail: IGoodsInfoF2e | null;
|
|
69
|
-
/** 下单老板 */
|
|
70
|
-
custom_user_detail: IUserInfoF2e | null;
|
|
71
|
-
/** 接单打手 */
|
|
72
|
-
assignee_user_detail: IUserInfoF2e | null;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
/** 创建订单的请求参数:TODO: 待定 */
|
|
77
|
-
export type IOrderInfoReqAdd = Omit<IOrderInfoToF2e,
|
|
78
|
-
'id' |
|
|
79
|
-
'status' |
|
|
80
|
-
'assignee_open_id' |
|
|
81
|
-
'assignee_open_id_b1' |
|
|
82
|
-
'assignee_open_id_b2' |
|
|
83
|
-
'support_images' |
|
|
84
|
-
|
|
85
|
-
'refund_status' |
|
|
86
|
-
'refund_reason' |
|
|
87
|
-
'refund_remark' |
|
|
88
|
-
'refund_out_trade_no' |
|
|
89
|
-
|
|
90
|
-
'create_time' |
|
|
91
|
-
'update_time'
|
|
92
|
-
>
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
/** 编辑订单的请求参数:TODO: 待定 */
|
|
96
|
-
export type IOrderInfoReqEdit = Partial<Omit<IOrderInfoToF2e, 'create_time' | 'update_time'>> & Pick<IOrderInfoToF2e, 'id'>
|
package/src/tenant.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/** 数据库存储的类型 */
|
|
2
|
-
export interface ITenantInfoDB {
|
|
3
|
-
id: number;
|
|
4
|
-
/** 该租户的管理员id */
|
|
5
|
-
admin_manager_id: number;
|
|
6
|
-
name: string;
|
|
7
|
-
domain: string;
|
|
8
|
-
status: 'active' | 'inactive';
|
|
9
|
-
config: string;
|
|
10
|
-
create_time: string;
|
|
11
|
-
update_time: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface ITenantConfigF2e {
|
|
15
|
-
id: number;
|
|
16
|
-
notice: string;
|
|
17
|
-
banner_list: string[];
|
|
18
|
-
// 是否展示申请退款
|
|
19
|
-
show_withdrawal: boolean;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/** 吐给前端的类型 */
|
|
23
|
-
export type ITenantInfoToF2e = Omit<ITenantInfoDB, 'config'> & {
|
|
24
|
-
config: ITenantConfigF2e;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/** 新增租户的请求参数 */
|
|
28
|
-
export type ITenantInfoReqAdd = Omit<ITenantInfoToF2e, 'id' | 'create_time' | 'update_time'>
|
|
29
|
-
|
|
30
|
-
/** 编辑租户的请求参数 */
|
|
31
|
-
export type ITenantInfoReqEdit = Partial<Omit<ITenantInfoToF2e, 'create_time' | 'update_time'>> & Pick<ITenantInfoToF2e, 'id'>
|
|
32
|
-
|
package/src/transaction.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
type ShareType =
|
|
3
|
-
/** 主要接单人 */
|
|
4
|
-
| 'a'
|
|
5
|
-
/** 队友 */
|
|
6
|
-
| 'b';
|
|
7
|
-
|
|
8
|
-
/** 交易记录 */
|
|
9
|
-
export interface ITransactionInfoDB {
|
|
10
|
-
/** 订单id */
|
|
11
|
-
_id: string;
|
|
12
|
-
/** 用户的id */
|
|
13
|
-
open_id: string;
|
|
14
|
-
/** 订单的id */
|
|
15
|
-
order_id: string;
|
|
16
|
-
/** 关联订单的总金额 */
|
|
17
|
-
total_amount: string;
|
|
18
|
-
/** 分钱的类型 */
|
|
19
|
-
share_type: ShareType;
|
|
20
|
-
/** 每个人分到的钱(总金额平均分) */
|
|
21
|
-
share_amount: number;
|
|
22
|
-
|
|
23
|
-
/** 该笔交易关联的订单,我可以抽成的佣金 */
|
|
24
|
-
brokerage: number;
|
|
25
|
-
|
|
26
|
-
/** 创建时间 */
|
|
27
|
-
create_time: number;
|
|
28
|
-
/** 更新时间 */
|
|
29
|
-
update_time: number;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export type ITransactionInfoDBF2e = ITransactionInfoDB
|
|
33
|
-
|
|
34
|
-
/** 新增交易记录的请求参数 */
|
|
35
|
-
export type ITransactionInfoReqAdd = Omit<ITransactionInfoDBF2e, 'id' | 'create_time' | 'update_time'>
|
package/src/user.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { GameZoneTS } from './base';
|
|
2
|
-
|
|
3
|
-
type AssigneeStatusTS =
|
|
4
|
-
/** 未申请打手的普通用户 */
|
|
5
|
-
| 'unapply'
|
|
6
|
-
/** 申请审核中 */
|
|
7
|
-
| 'applying'
|
|
8
|
-
/** 激活的打手 */
|
|
9
|
-
| 'active'
|
|
10
|
-
/** 被禁用的打手 */
|
|
11
|
-
| 'disabled';
|
|
12
|
-
|
|
13
|
-
interface PayInfo {
|
|
14
|
-
account: string;
|
|
15
|
-
image_url: string;
|
|
16
|
-
name: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface IUserInfoDB {
|
|
20
|
-
id: number;
|
|
21
|
-
open_id: string;
|
|
22
|
-
/** 昵称 */
|
|
23
|
-
nickname: string;
|
|
24
|
-
/** 头像 */
|
|
25
|
-
avatar: string;
|
|
26
|
-
/** 打手姓名 */
|
|
27
|
-
assignee_name: string;
|
|
28
|
-
/** 打手性别 */
|
|
29
|
-
assignee_gender: '男' | '女';
|
|
30
|
-
/** 打手申请状态 */
|
|
31
|
-
assignee_status: AssigneeStatusTS;
|
|
32
|
-
/** 打手游戏区服 */
|
|
33
|
-
assignee_game_zone: GameZoneTS;
|
|
34
|
-
/** 打手个人简介 */
|
|
35
|
-
assignee_self_info: string;
|
|
36
|
-
/** 个人认证图像 */
|
|
37
|
-
assignee_certified_images: string;
|
|
38
|
-
/** 打手等级id */
|
|
39
|
-
assignee_level_id: number;
|
|
40
|
-
/** 提交申请打手的时间 */
|
|
41
|
-
assignee_apply_time?: string;
|
|
42
|
-
/** 手机号 */
|
|
43
|
-
phone_number: string;
|
|
44
|
-
/** 手机区码 */
|
|
45
|
-
phone_country_code: string;
|
|
46
|
-
/** 余额 */
|
|
47
|
-
balance: number;
|
|
48
|
-
/** 微信支付方式 */
|
|
49
|
-
wx_pay_info: string;
|
|
50
|
-
/** 支付宝支付方式 */
|
|
51
|
-
zfb_pay_info: string;
|
|
52
|
-
|
|
53
|
-
/** 更新时间 */
|
|
54
|
-
update_time?: string;
|
|
55
|
-
/** 用户初次小程序的时间 */
|
|
56
|
-
create_time?: string;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export type IUserInfoF2e = IUserInfoDB & {
|
|
60
|
-
/** 个人认证图像 */
|
|
61
|
-
assignee_certified_images: string[];
|
|
62
|
-
/** 微信支付方式 */
|
|
63
|
-
wx_pay_info: PayInfo;
|
|
64
|
-
/** 支付宝支付方式 */
|
|
65
|
-
zfb_pay_info: PayInfo;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
/** 新增客户端用户的请求参数 */
|
|
69
|
-
export type IUserInfoReqAdd = Pick<IUserInfoF2e, 'open_id'>
|
|
70
|
-
|
|
71
|
-
/** 编辑客户端用户的请求参数 */
|
|
72
|
-
export type IUserInfoReqEdit = Partial<Omit<IUserInfoF2e, 'create_time' | 'update_time'>> & Pick<IUserInfoF2e, 'id'>
|
package/src/withdrawal.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { IUserInfoF2e } from './user';
|
|
2
|
-
|
|
3
|
-
/** 数据库存储的, 提现记录 */
|
|
4
|
-
export interface IWithdrawalInfoDB {
|
|
5
|
-
/** 提现记录的id */
|
|
6
|
-
id: number;
|
|
7
|
-
/** 发起提现人的id */
|
|
8
|
-
open_id: string;
|
|
9
|
-
/** 支付方式 */
|
|
10
|
-
pay_way: 'wx' | 'zfb';
|
|
11
|
-
/** 支付状态 */
|
|
12
|
-
status: 'paid' | 'unpaid';
|
|
13
|
-
|
|
14
|
-
/** 提现金额 */
|
|
15
|
-
currency: number;
|
|
16
|
-
/** 打款凭证 */
|
|
17
|
-
attachments: string;
|
|
18
|
-
|
|
19
|
-
/** 解决时间 */
|
|
20
|
-
solve_time: null;
|
|
21
|
-
/** 创建时间 */
|
|
22
|
-
create_time: number;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/** 返回给前端的 */
|
|
26
|
-
export type IWithdrawalDatumReturnToF2e = Omit<IWithdrawalInfoDB, 'attachments'> & {
|
|
27
|
-
/** 申请人的信息, 需要根据open_id,关联其他表查询 */
|
|
28
|
-
user_detail: IUserInfoF2e;
|
|
29
|
-
/** 打款凭证 */
|
|
30
|
-
attachments: { name: string; url: string }[];
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
/** 新增“提现记录”的请求参数 */
|
|
35
|
-
export type IWithdrawalInfoReqAdd = Omit<IWithdrawalDatumReturnToF2e, 'id' | 'create_time' | 'solve_time'>
|
|
36
|
-
|
|
37
|
-
/** 修改“提现记录”为已完成 */
|
|
38
|
-
export type IWithdrawalInfoReqEdit = Pick<IWithdrawalInfoDB, 'id' | 'attachments'>
|
package/tsconfig.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"outDir": "./dist", // 编译输出目录
|
|
4
|
-
"declaration": true, // 生成 .d.ts 类型定义文件
|
|
5
|
-
"declarationMap": true, // 生成 .d.ts.map 文件
|
|
6
|
-
"module": "ESNext", // ES 模块系统
|
|
7
|
-
"target": "ESNext", // 编译目标
|
|
8
|
-
"strict": true, // 启用严格模式
|
|
9
|
-
"esModuleInterop": true, // 兼容 ES 模块
|
|
10
|
-
"skipLibCheck": true, // 跳过库文件检查
|
|
11
|
-
"forceConsistentCasingInFileNames": true // 文件名大小写一致
|
|
12
|
-
},
|
|
13
|
-
"include": ["src/**/*"], // 需要编译的源文件
|
|
14
|
-
"exclude": ["node_modules"] // 排除目录
|
|
15
|
-
}
|