feat: enhance admin product management with AI categorization, product status updates, and email editing for users
This commit is contained in:
@@ -5,6 +5,9 @@ class AdminProduct {
|
||||
final String? normalizedName;
|
||||
final int? categoryId;
|
||||
final String? categoryPath;
|
||||
final bool? isActive;
|
||||
final String? status;
|
||||
final DateTime? deletedAt;
|
||||
|
||||
const AdminProduct({
|
||||
required this.id,
|
||||
@@ -13,6 +16,9 @@ class AdminProduct {
|
||||
this.normalizedName,
|
||||
this.categoryId,
|
||||
this.categoryPath,
|
||||
this.isActive,
|
||||
this.status,
|
||||
this.deletedAt,
|
||||
});
|
||||
|
||||
String get displayName =>
|
||||
@@ -39,6 +45,11 @@ class AdminProduct {
|
||||
normalizedName: json['normalizedName']?.toString(),
|
||||
categoryId: (json['categoryId'] as num?)?.toInt(),
|
||||
categoryPath: names.isEmpty ? null : names.join(' > '),
|
||||
isActive: json['isActive'] as bool?,
|
||||
status: json['status']?.toString(),
|
||||
deletedAt: json['deletedAt'] == null
|
||||
? null
|
||||
: DateTime.tryParse(json['deletedAt'].toString()),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user