feat:初始化工程
This commit is contained in:
43
lib/modesl/health.dart
Normal file
43
lib/modesl/health.dart
Normal file
@@ -0,0 +1,43 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class Health {
|
||||
@JsonKey(name: 'id')
|
||||
int? id;
|
||||
|
||||
@JsonKey(name: 'sportProject')
|
||||
String? sportProject;
|
||||
|
||||
@JsonKey(name: 'sportDuration')
|
||||
int? sportDuration;
|
||||
|
||||
@JsonKey(name: 'weight')
|
||||
int? weight;
|
||||
|
||||
@JsonKey(name: 'sleepStartTime')
|
||||
String? sleepStartTime;
|
||||
|
||||
@JsonKey(name: 'sleepEndTime')
|
||||
String? sleepEndTime;
|
||||
|
||||
@JsonKey(name: 'sleepDuration')
|
||||
int? sleepDuration;
|
||||
|
||||
@JsonKey(name: 'date')
|
||||
String date;
|
||||
|
||||
Health({
|
||||
this.id,
|
||||
this.sportProject,
|
||||
this.sportDuration,
|
||||
this.weight,
|
||||
this.sleepStartTime,
|
||||
this.sleepEndTime,
|
||||
this.sleepDuration,
|
||||
required this.date
|
||||
});
|
||||
|
||||
// factory Health.fromJson(Map<String, dynamic> json) => _$HealthFromJson(json);
|
||||
//
|
||||
// Map<String, dynamic> toJson() => _$HealthToJson(this);
|
||||
}
|
||||
Reference in New Issue
Block a user