1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-22 21:09:21 +00:00
comunicmobile/lib/models/cache_model.dart

20 lines
464 B
Dart
Raw Normal View History

2019-04-24 11:56:56 +00:00
import 'package:comunic/helpers/database/database_contract.dart';
import 'package:meta/meta.dart';
/// Cache base model
///
/// @author Pierre HUBERT
abstract class CacheModel {
2022-03-10 18:02:06 +00:00
final int/*!*/ id;
2019-04-24 11:56:56 +00:00
const CacheModel({@required this.id}) : assert(id != null);
/// Initialize a CacheModel from a map
CacheModel.fromMap(Map<String, dynamic> map)
: id = map[BaseTableContract.C_ID];
/// Convert the object to a map
Map<String, dynamic> toMap();
}