Browse Source

add model historyAction

master
daivph 5 years ago
parent
commit
90c5560bb1
6 changed files with 98 additions and 47 deletions
  1. +9
    -0
      jsons/HistoryAction.json
  2. +19
    -0
      lib/models/HistoryAction.dart
  3. +29
    -0
      lib/models/HistoryAction.g.dart
  4. +1
    -0
      lib/models/index.dart
  5. +38
    -45
      pubspec.lock
  6. +2
    -2
      pubspec.yaml

+ 9
- 0
jsons/HistoryAction.json View File

{
"id": 1,
"ageDay": 24,
"cropId": 1,
"executeDate": "2020-08-20T02:34:18Z",
"description": "test",
"activityTypeId": 1,
"activityTypeName": "ACTIVE_TYPE_NURSERY"
}

+ 19
- 0
lib/models/HistoryAction.dart View File

import 'package:json_annotation/json_annotation.dart';

part 'HistoryAction.g.dart';

@JsonSerializable()
class HistoryAction {
HistoryAction();

num id;
num ageDay;
num cropId;
String executeDate;
String description;
num activityTypeId;
String activityTypeName;
factory HistoryAction.fromJson(Map<String,dynamic> json) => _$HistoryActionFromJson(json);
Map<String, dynamic> toJson() => _$HistoryActionToJson(this);
}

+ 29
- 0
lib/models/HistoryAction.g.dart View File

// GENERATED CODE - DO NOT MODIFY BY HAND

part of 'HistoryAction.dart';

// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************

HistoryAction _$HistoryActionFromJson(Map<String, dynamic> json) {
return HistoryAction()
..id = json['id'] as num
..ageDay = json['ageDay'] as num
..cropId = json['cropId'] as num
..executeDate = json['executeDate'] as String
..description = json['description'] as String
..activityTypeId = json['activityTypeId'] as num
..activityTypeName = json['activityTypeName'] as String;
}

Map<String, dynamic> _$HistoryActionToJson(HistoryAction instance) =>
<String, dynamic>{
'id': instance.id,
'ageDay': instance.ageDay,
'cropId': instance.cropId,
'executeDate': instance.executeDate,
'description': instance.description,
'activityTypeId': instance.activityTypeId,
'activityTypeName': instance.activityTypeName
};

+ 1
- 0
lib/models/index.dart View File

export 'Supply.dart' ; export 'Supply.dart' ;
export 'Plot.dart' ; export 'Plot.dart' ;
export 'ResourceHelper.dart' ; export 'ResourceHelper.dart' ;
export 'HistoryAction.dart' ;
export 'ActionType.dart' ; export 'ActionType.dart' ;
export 'OtherAction.dart' ; export 'OtherAction.dart' ;

+ 38
- 45
pubspec.lock View File

# Generated by pub # Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile # See https://dart.dev/tools/pub/glossary#lockfile
packages: packages:
_fe_analyzer_shared:
dependency: transitive
description:
name: _fe_analyzer_shared
url: "https://pub.dartlang.org"
source: hosted
version: "7.0.0"
analyzer: analyzer:
dependency: transitive dependency: transitive
description: description:
name: analyzer name: analyzer
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.39.17"
version: "0.36.4"
archive: archive:
dependency: transitive dependency: transitive
description: description:
name: build name: build
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0"
version: "1.1.6"
build_config: build_config:
dependency: transitive dependency: transitive
description: description:
name: build_config name: build_config
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.2"
version: "0.4.1+1"
build_daemon: build_daemon:
dependency: transitive dependency: transitive
description: description:
name: build_resolvers name: build_resolvers
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.11"
version: "1.2.1"
build_runner: build_runner:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: build_runner name: build_runner
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.10.0"
version: "1.6.9"
build_runner_core: build_runner_core:
dependency: transitive dependency: transitive
description: description:
name: build_runner_core name: build_runner_core
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "5.2.0"
version: "3.1.1"
built_collection: built_collection:
dependency: transitive dependency: transitive
description: description:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.0.2" version: "1.0.2"
cli_util:
dependency: transitive
description:
name: cli_util
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0"
code_builder: code_builder:
dependency: transitive dependency: transitive
description: description:
name: dart_style name: dart_style
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.6"
version: "1.2.9"
dio: dio:
dependency: "direct main" dependency: "direct main"
description: description:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.3.0" version: "0.3.0"
front_end:
dependency: transitive
description:
name: front_end
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.19"
get: get:
dependency: "direct main" dependency: "direct main"
description: description:
name: json_annotation name: json_annotation
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.0.1"
version: "2.3.0"
json_model:
dependency: "direct dev"
description:
name: json_model
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.2"
json_serializable: json_serializable:
dependency: "direct dev" dependency: "direct dev"
description: description:
name: json_serializable name: json_serializable
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.4.1"
version: "2.3.0"
kernel:
dependency: transitive
description:
name: kernel
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.19"
keyboard_dismisser: keyboard_dismisser:
dependency: "direct main" dependency: "direct main"
description: description:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.3" version: "0.4.3"
package_resolver:
dependency: transitive
description:
name: package_resolver
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.10"
path: path:
dependency: transitive dependency: transitive
description: description:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.3" version: "2.1.3"
retrofit:
dependency: transitive
description:
name: retrofit
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.4"
retrofit_generator:
dependency: "direct dev"
description:
name: retrofit_generator
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.7+6"
rxdart: rxdart:
dependency: "direct main" dependency: "direct main"
description: description:
name: source_gen name: source_gen
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.9.6"
version: "0.9.4+4"
source_span: source_span:
dependency: transitive dependency: transitive
description: description:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.1+2" version: "0.1.1+2"
tuple:
dependency: transitive
description:
name: tuple
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:

+ 2
- 2
pubspec.yaml View File

flutter_test: flutter_test:
sdk: flutter sdk: flutter
#flutter packages pub run build_runner build --delete-conflicting-outputs #flutter packages pub run build_runner build --delete-conflicting-outputs
retrofit_generator: ^1.3.7
# retrofit_generator: ^1.3.7
# flutter packages pub run json_model # flutter packages pub run json_model
# json_model: ^0.0.2
json_model: ^0.0.2
build_runner: any build_runner: any
json_serializable: any json_serializable: any

Loading…
Cancel
Save