// image_metadata_model.dart import 'package:problem_check_system/data/models/enum_model.dart'; class ImageMetadata { final String localPath; final String? remoteUrl; final ImageStatus status; ImageMetadata({ required this.localPath, this.remoteUrl, required this.status, }); // For saving to SQL Map toMap() { return { 'localPath': localPath, 'remoteUrl': remoteUrl, 'status': status.index, }; } // For reading from SQL factory ImageMetadata.fromMap(Map map) { return ImageMetadata( localPath: map['localPath'] as String, remoteUrl: map['remoteUrl'] as String?, status: ImageStatus.values[map['status'] as int], ); } }