123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- import 'package:flutter_tracker/utils/time_util.dart';
- import 'message_model.dart';
- /// Description:
- /// Time : 2021年12月03日 Friday
- /// Author : liuyuqi.gov@msncn
- class SubmitModel {
- int id;
- int userid;
- DateTime time;
- String address;
- String telphone;
- int health;
- String pic;
- SubmitModel(
- {this.id,
- this.userid,
- this.time,
- this.address,
- this.telphone,
- this.health,
- this.pic});
- SubmitModel.fromJson(Map<String, dynamic> json) {
- id = int.parse(json["submitid"]);
- // userid = int.parse(json['userid']);
- time = TimeUtil.getDateTime(json['time']);
- address = json['address'];
- telphone = json['telphone'];
- health = json['health'];
- }
- }
- class SubmitEntity {
- SubmitModel submitModel;
- MessageModel msg;
- SubmitEntity(this.submitModel, this.msg);
- SubmitEntity.fromJson(Map<String, dynamic> json) {
- msg = MessageModel.fromJson(json);
- if (msg.success) {
- submitModel = SubmitModel.fromJson(json["data"]);
- }
- }
- }
|