platform/packages/model/lib/angel3_model.dart
thomashii@dukefirehawk.com 82c6c9866e Publish angel3_model
2021-05-14 15:23:53 +08:00

20 lines
502 B
Dart

//library angel3_model;
/// Represents arbitrary data, with an associated ID and timestamps.
class Model {
/// A unique identifier corresponding to this item.
String? id;
String? error;
/// 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 => id == null ? null : int.tryParse(id!);
}