platform/test/shared.dart
thosakwe 269b0483db +20
2016-12-10 12:28:24 -05:00

22 lines
471 B
Dart

import "package:angel_framework/src/defs.dart";
class Postcard extends MemoryModel {
int id;
String location;
String message;
Postcard({String this.location, String this.message});
@override
bool operator ==(other) {
if (!(other is Postcard)) return false;
return id == other.id &&
location == other.location &&
message == other.message;
}
Map toJson() {
return {'id': id, 'location': location, 'message': message};
}
}