Refactoring
This commit is contained in:
1 parent
e97194fa70
commit
3fcf64c135
3 files changed
+845
No files matched your search
@@ -0,0 +1,35 @@
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'status.g.dart';
|
||||
|
||||
@collection
|
||||
@JsonSerializable()
|
||||
class Status {
|
||||
late Id? id;
|
||||
|
||||
late StatusPos pos;
|
||||
|
||||
Status();
|
||||
|
||||
factory Status.fromJson(Map<String, dynamic> json) => _$StatusFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$StatusToJson(this);
|
||||
}
|
||||
|
||||
@embedded
|
||||
@JsonSerializable()
|
||||
class StatusPos {
|
||||
late String zip;
|
||||
|
||||
late String area;
|
||||
|
||||
@JsonKey(name:'zip_real')
|
||||
late String zipReal;
|
||||
|
||||
StatusPos();
|
||||
|
||||
factory StatusPos.fromJson(Map<String, dynamic> json) => _$StatusPosFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$StatusPosToJson(this);
|
||||
}
|
||||
Reference in new issue
Block a user