diff --git a/README.md b/README.md index 5aeb82bd..80a2b5c8 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,12 @@ # angel_model Angel's basic data model class, no longer with the added weight of the whole framework. + +```dart +// Old: import 'package:angel_framework/common.dart' show Model; + +// The new way!!! +import 'package:angel_model/angel_model.dart'; +``` + +This package was created to prevent dependency collisions with third-party packages. +`framework/common` will continue to export this class. \ No newline at end of file diff --git a/lib/angel_model.dart b/lib/angel_model.dart new file mode 100644 index 00000000..c07e0596 --- /dev/null +++ b/lib/angel_model.dart @@ -0,0 +1,8 @@ +/// Represents arbitrary data, with an associated ID and timestamps. +class Model { + String id; + DateTime createdAt; + DateTime updatedAt; + + Model({this.id, this.createdAt, this.updatedAt}); +} \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 00000000..fad57ab2 --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,5 @@ +name: angel_model +version: 1.0.0 +description: Angel's basic data model class, no longer with the added weight of the whole framework. +author: Tobe O +homepage: https://github.com/angel-dart/model \ No newline at end of file