lzh-common 0.0.1 → 0.0.2
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 +1 -1
- package/src/goods.ts +36 -0
- package/src/index.ts +12 -1
package/package.json
CHANGED
package/src/goods.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** 商品状态 */
|
|
2
|
+
export type GoodsStatusTS = 'active' | 'inactive';
|
|
3
|
+
|
|
4
|
+
/** 商品的详情 */
|
|
5
|
+
export interface IGoodsInfoDB {
|
|
6
|
+
id: number;
|
|
7
|
+
/** 类别 */
|
|
8
|
+
category_id: number;
|
|
9
|
+
/** 排序 */
|
|
10
|
+
rank: 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 IGoodsInfoAddReq = Omit<IGoodsInfoDB, 'id'>
|