37 lines
693 B
Dart
37 lines
693 B
Dart
import 'package:isar/isar.dart';
|
|
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
part 'status.g.dart';
|
|
|
|
@collection
|
|
@JsonSerializable()
|
|
class Status {
|
|
@JsonKey(name: "id", defaultValue: 0)
|
|
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);
|
|
}
|