feat: directus视图与转换函数
- views: 用于前端渲染的视图模型 - mapper: 用于视图模型转换的转换函数 - utils: 相关工具函数
This commit is contained in:
20
app/models/views/ProductListView.ts
Normal file
20
app/models/views/ProductListView.ts
Normal file
@ -0,0 +1,20 @@
|
||||
/**
|
||||
* 产品列表视图模型
|
||||
* 用于产品列表(/products)渲染的数据结构
|
||||
*/
|
||||
export interface ProductListView {
|
||||
/** 唯一标识符 **/
|
||||
id: number;
|
||||
|
||||
/** 产品名称 **/
|
||||
name: string;
|
||||
|
||||
/** 产品简介 **/
|
||||
summary: string;
|
||||
|
||||
/** 产品类型 **/
|
||||
product_type: string;
|
||||
|
||||
/** 产品封面(图片的id) **/
|
||||
cover: string;
|
||||
}
|
||||
Reference in New Issue
Block a user