Files
flutterApp/lib/core/data/base_model.dart

10 lines
261 B
Dart
Raw Permalink Normal View History

2026-01-18 20:21:14 +08:00
import '../../features/devices/domain/entities/device_entity.dart';
2026-01-27 18:44:49 +08:00
abstract class BaseModel<E> {
/// 将 Model 转换为对应的 Domain Entity
E toEntity();
/// 将 Model 转换为 JSON(用于持久化或日志)
2026-01-18 20:21:14 +08:00
Map<String, dynamic> toJson();
}