feat:搭建基本框架
This commit is contained in:
79
src/types/food.ts
Normal file
79
src/types/food.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
export type IFoodSegment = 'recipe' | 'daily' | 'timeline'
|
||||
|
||||
/**
|
||||
* 菜谱信息
|
||||
*/
|
||||
export interface IFoodRecipe {
|
||||
id?: number;
|
||||
/**
|
||||
* 美食名称
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* 美食菜系
|
||||
*/
|
||||
category: string;
|
||||
/**
|
||||
* 推荐指数
|
||||
*/
|
||||
recommendRate: number;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
/**
|
||||
* 食材
|
||||
*/
|
||||
materialList: IFoodMaterial[];
|
||||
/**
|
||||
* 步骤
|
||||
*/
|
||||
stepList: IFoodStep[];
|
||||
/**
|
||||
* 成果
|
||||
*/
|
||||
recordList: IFoodRecord[];
|
||||
}
|
||||
|
||||
/**
|
||||
* 食材信息
|
||||
*/
|
||||
export interface IFoodMaterial {
|
||||
type: string;
|
||||
name: string;
|
||||
amount: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 步骤信息
|
||||
*/
|
||||
export interface IFoodStep {
|
||||
sort: number;
|
||||
content: string;
|
||||
imageUrl: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 成果信息
|
||||
*/
|
||||
export interface IFoodRecord {
|
||||
id: number;
|
||||
name: string;
|
||||
category: string;
|
||||
date: string;
|
||||
person: string;
|
||||
imageUrl: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计信息
|
||||
*/
|
||||
export interface IFoodStats {
|
||||
recipeCount: number;
|
||||
categoryCount: number;
|
||||
workCount: number;
|
||||
}
|
||||
|
||||
export interface IFoodQuery {
|
||||
category: string;
|
||||
}
|
||||
Reference in New Issue
Block a user