feat(client): 商品基础数据加香型字典 tab(接后端 categories CRUD)
新增 ProductCategoryOption 模型 + repo(list/create/update/deleteCategory)+ provider(productCategoryListProvider),基础数据页加「香型」tab(增删改查、 搜索、导出,仅名称字段)。接通后端 /product-options/categories。 (原型 5-tab 整合是更大 IA 任务,本次先把香型管理补齐可用。) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TSKEiHsvauyxYUW2itzUXX
This commit is contained in:
@@ -42,6 +42,20 @@ class ProductSeriesOption {
|
||||
);
|
||||
}
|
||||
|
||||
/// 香型 / 分类字典项(对应后端 ProductCategory)。
|
||||
class ProductCategoryOption {
|
||||
final int id;
|
||||
final String name;
|
||||
|
||||
const ProductCategoryOption({required this.id, required this.name});
|
||||
|
||||
factory ProductCategoryOption.fromJson(Map<String, dynamic> json) =>
|
||||
ProductCategoryOption(
|
||||
id: (json['id'] as num).toInt(),
|
||||
name: json['name'] as String,
|
||||
);
|
||||
}
|
||||
|
||||
class ProductSpecOption {
|
||||
final int id;
|
||||
final String? code;
|
||||
|
||||
Reference in New Issue
Block a user