platform/lib/angel_model.dart
2019-03-28 20:51:02 -04:00

16 lines
434 B
Dart

/// Represents arbitrary data, with an associated ID and timestamps.
class Model {
/// A unique identifier corresponding to this item.
String id;
/// The time at which this item was created.
DateTime createdAt;
/// The last time at which this item was updated.
DateTime updatedAt;
Model({this.id, this.createdAt, this.updatedAt});
/// Returns the [id], parsed as an [int].
int get idAsInt => int.tryParse(id);
}