feat: directus视图与转换函数
- views: 用于前端渲染的视图模型 - mapper: 用于视图模型转换的转换函数 - utils: 相关工具函数
This commit is contained in:
29
app/models/views/ProductSpecGroupView.ts
Normal file
29
app/models/views/ProductSpecGroupView.ts
Normal file
@ -0,0 +1,29 @@
|
||||
/**
|
||||
* 产品规格模型
|
||||
* 用于产品规格渲染的数据结构
|
||||
*/
|
||||
export interface ProductSpecView {
|
||||
/** 唯一标识符 **/
|
||||
id: number;
|
||||
|
||||
/** 规格名称 **/
|
||||
key: string;
|
||||
|
||||
/** 规格值 **/
|
||||
value: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 产品规格表模型
|
||||
* 用于产品规格表渲染的数据结构
|
||||
*/
|
||||
export interface ProductSpecGroupView {
|
||||
/** 唯一标识符 **/
|
||||
id: number;
|
||||
|
||||
/** 规格组名称 **/
|
||||
name: string;
|
||||
|
||||
/** 规格组 **/
|
||||
specs: ProductSpecView[];
|
||||
}
|
||||
Reference in New Issue
Block a user