Browse Source

add models and action screens

master
daivph 5 years ago
parent
commit
23739ad62e
23 changed files with 679 additions and 23 deletions
  1. +1
    -1
      ios/Flutter/.last_build_id
  2. +24
    -0
      lib/custom_model/ActionEnd.dart
  3. +62
    -0
      lib/custom_model/Disease.dart
  4. +54
    -0
      lib/custom_model/Dung.dart
  5. +61
    -0
      lib/custom_model/Environment.dart
  6. +44
    -0
      lib/custom_model/Harvest.dart
  7. +62
    -0
      lib/custom_model/HarvestProcess.dart
  8. +48
    -0
      lib/custom_model/Packing.dart
  9. +2
    -22
      lib/custom_model/Plant.dart
  10. +52
    -0
      lib/custom_model/Sell.dart
  11. +58
    -0
      lib/custom_model/Spraying.dart
  12. +36
    -0
      lib/custom_model/SuppliesUsing.dart
  13. +36
    -0
      lib/custom_model/UseWater.dart
  14. +14
    -0
      lib/presentation/screens/actions/disease/sc_edit_action_disease.dart
  15. +13
    -0
      lib/presentation/screens/actions/dung/sc_edit_action_dung.dart
  16. +13
    -0
      lib/presentation/screens/actions/end/sc_edit_action_end.dart
  17. +15
    -0
      lib/presentation/screens/actions/environment_update/sc_edit_action_environment_update.dart
  18. +14
    -0
      lib/presentation/screens/actions/harvest/sc_edit_action_harvest.dart
  19. +15
    -0
      lib/presentation/screens/actions/harvest_process/sc_edit_action_harvest_process.dart
  20. +14
    -0
      lib/presentation/screens/actions/packing/sc_edit_action_packing.dart
  21. +13
    -0
      lib/presentation/screens/actions/sell/sc_edit_action_sell.dart
  22. +14
    -0
      lib/presentation/screens/actions/spraying/sc_edit_action_spraying.dart
  23. +14
    -0
      lib/presentation/screens/actions/use_water/sc_edit_action_user_water.dart

+ 1
- 1
ios/Flutter/.last_build_id View File

0d1f90510e22958a585802bb59f9c570
eb141365fb69a4e0decadd2584d53516

+ 24
- 0
lib/custom_model/ActionEnd.dart View File

class ActionEnd {
int id;
int activityId;
String executeDate;
String description;

ActionEnd({this.id, this.activityId, this.executeDate, this.description});

ActionEnd.fromJson(Map<String, dynamic> json) {
id = json['id'];
activityId = json['activityId'];
executeDate = json['executeDate'];
description = json['description'];
}

Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['activityId'] = this.activityId;
data['executeDate'] = this.executeDate;
data['description'] = this.description;
return data;
}
}

+ 62
- 0
lib/custom_model/Disease.dart View File

class Disease {
int id;
int cropId;
String executeDate;
String description;
List<ObjectUpdateDetail> objectUpdateDetail;

Disease(
{this.id,
this.cropId,
this.executeDate,
this.description,
this.objectUpdateDetail});

Disease.fromJson(Map<String, dynamic> json) {
id = json['id'];
cropId = json['cropId'];
executeDate = json['executeDate'];
description = json['description'];
if (json['objectUpdateDetail'] != null) {
objectUpdateDetail = new List<ObjectUpdateDetail>();
json['objectUpdateDetail'].forEach((v) {
objectUpdateDetail.add(new ObjectUpdateDetail.fromJson(v));
});
}
}

Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['cropId'] = this.cropId;
data['executeDate'] = this.executeDate;
data['description'] = this.description;
if (this.objectUpdateDetail != null) {
data['objectUpdateDetail'] =
this.objectUpdateDetail.map((v) => v.toJson()).toList();
}
return data;
}
}

class ObjectUpdateDetail {
int id;
String name;
int index;

ObjectUpdateDetail({this.id, this.name, this.index});

ObjectUpdateDetail.fromJson(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
index = json['index'];
}

Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['name'] = this.name;
data['index'] = this.index;
return data;
}
}

+ 54
- 0
lib/custom_model/Dung.dart View File

import 'SuppliesUsing.dart';

class Dung {
int id;
int cropId;
String executeDate;
String description;
num quarantinePeriod;
String weatherConditions;
String purpose;
List<SuppliesUsing> suppliesUsing;

Dung(
{this.id,
this.cropId,
this.executeDate,
this.description,
this.quarantinePeriod,
this.weatherConditions,
this.purpose,
this.suppliesUsing});

Dung.fromJson(Map<String, dynamic> json) {
id = json['id'];
cropId = json['cropId'];
executeDate = json['executeDate'];
description = json['description'];
quarantinePeriod = json['quarantinePeriod'];
weatherConditions = json['weatherConditions'];
purpose = json['purpose'];
if (json['suppliesUsing'] != null) {
suppliesUsing = new List<SuppliesUsing>();
json['suppliesUsing'].forEach((v) {
suppliesUsing.add(new SuppliesUsing.fromJson(v));
});
}
}

Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['cropId'] = this.cropId;
data['executeDate'] = this.executeDate;
data['description'] = this.description;
data['quarantinePeriod'] = this.quarantinePeriod;
data['weatherConditions'] = this.weatherConditions;
data['purpose'] = this.purpose;
if (this.suppliesUsing != null) {
data['suppliesUsing'] =
this.suppliesUsing.map((v) => v.toJson()).toList();
}
return data;
}
}

+ 61
- 0
lib/custom_model/Environment.dart View File

class Environment {
int id;
int cropId;
String executeDate;
String description;
List<EnvDetail> envDetail;

Environment(
{this.id,
this.cropId,
this.executeDate,
this.description,
this.envDetail});

Environment.fromJson(Map<String, dynamic> json) {
id = json['id'];
cropId = json['cropId'];
executeDate = json['executeDate'];
description = json['description'];
if (json['envDetail'] != null) {
envDetail = new List<EnvDetail>();
json['envDetail'].forEach((v) {
envDetail.add(new EnvDetail.fromJson(v));
});
}
}

Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['cropId'] = this.cropId;
data['executeDate'] = this.executeDate;
data['description'] = this.description;
if (this.envDetail != null) {
data['envDetail'] = this.envDetail.map((v) => v.toJson()).toList();
}
return data;
}
}

class EnvDetail {
int id;
String name;
int index;

EnvDetail({this.id, this.name, this.index});

EnvDetail.fromJson(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
index = json['index'];
}

Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['name'] = this.name;
data['index'] = this.index;
return data;
}
}

+ 44
- 0
lib/custom_model/Harvest.dart View File

class Harvest {
int id;
int activityId;
String executeDate;
String description;
num collectedQuantityLv1;
num collectedQuantityLv2;
num collectedQuantityLv3;
num removedQuantity;

Harvest(
{this.id,
this.activityId,
this.executeDate,
this.description,
this.collectedQuantityLv1,
this.collectedQuantityLv2,
this.collectedQuantityLv3,
this.removedQuantity});

Harvest.fromJson(Map<String, dynamic> json) {
id = json['id'];
activityId = json['activityId'];
executeDate = json['executeDate'];
description = json['description'];
collectedQuantityLv1 = json['collectedQuantityLv1'];
collectedQuantityLv2 = json['collectedQuantityLv2'];
collectedQuantityLv3 = json['collectedQuantityLv3'];
removedQuantity = json['removedQuantity'];
}

Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['activityId'] = this.activityId;
data['executeDate'] = this.executeDate;
data['description'] = this.description;
data['collectedQuantityLv1'] = this.collectedQuantityLv1;
data['collectedQuantityLv2'] = this.collectedQuantityLv2;
data['collectedQuantityLv3'] = this.collectedQuantityLv3;
data['removedQuantity'] = this.removedQuantity;
return data;
}
}

+ 62
- 0
lib/custom_model/HarvestProcess.dart View File

import 'SuppliesUsing.dart';

class HarvestProcess {
int id;
int activityId;
int harvestId;
String executeDate;
String description;
int quantityLv1;
int quantityLv2;
int quantityLv3;
int removedQuantity;
List<SuppliesUsing> suppliesUsing;

HarvestProcess(
{this.id,
this.activityId,
this.harvestId,
this.executeDate,
this.description,
this.quantityLv1,
this.quantityLv2,
this.quantityLv3,
this.removedQuantity,
this.suppliesUsing});

HarvestProcess.fromJson(Map<String, dynamic> json) {
id = json['id'];
activityId = json['activityId'];
harvestId = json['harvestId'];
executeDate = json['executeDate'];
description = json['description'];
quantityLv1 = json['quantityLv1'];
quantityLv2 = json['quantityLv2'];
quantityLv3 = json['quantityLv3'];
removedQuantity = json['removedQuantity'];
if (json['suppliesUsing'] != null) {
suppliesUsing = new List<SuppliesUsing>();
json['suppliesUsing'].forEach((v) {
suppliesUsing.add(new SuppliesUsing.fromJson(v));
});
}
}

Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['activityId'] = this.activityId;
data['harvestId'] = this.harvestId;
data['executeDate'] = this.executeDate;
data['description'] = this.description;
data['quantityLv1'] = this.quantityLv1;
data['quantityLv2'] = this.quantityLv2;
data['quantityLv3'] = this.quantityLv3;
data['removedQuantity'] = this.removedQuantity;
if (this.suppliesUsing != null) {
data['suppliesUsing'] =
this.suppliesUsing.map((v) => v.toJson()).toList();
}
return data;
}
}

+ 48
- 0
lib/custom_model/Packing.dart View File

class Packing {
int id;
int activityId;
int harvestId;
String executeDate;
String description;
num quantityLv1;
num quantityLv2;
num quantityLv3;
num removedQuantity;

Packing(
{this.id,
this.activityId,
this.harvestId,
this.executeDate,
this.description,
this.quantityLv1,
this.quantityLv2,
this.quantityLv3,
this.removedQuantity});

Packing.fromJson(Map<String, dynamic> json) {
id = json['id'];
activityId = json['activityId'];
harvestId = json['harvestId'];
executeDate = json['executeDate'];
description = json['description'];
quantityLv1 = json['quantityLv1'];
quantityLv2 = json['quantityLv2'];
quantityLv3 = json['quantityLv3'];
removedQuantity = json['removedQuantity'];
}

Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['activityId'] = this.activityId;
data['harvestId'] = this.harvestId;
data['executeDate'] = this.executeDate;
data['description'] = this.description;
data['quantityLv1'] = this.quantityLv1;
data['quantityLv2'] = this.quantityLv2;
data['quantityLv3'] = this.quantityLv3;
data['removedQuantity'] = this.removedQuantity;
return data;
}
}

+ 2
- 22
lib/custom_model/Plant.dart View File

import 'SuppliesUsing.dart';

class Plant { class Plant {
int cropId; int cropId;
String executeDate; String executeDate;
return data; return data;
} }
} }

class SuppliesUsing {
String dosage;
int quantity;
int suppliesInWarehouseId;

SuppliesUsing({this.dosage, this.quantity, this.suppliesInWarehouseId});

SuppliesUsing.fromJson(Map<String, dynamic> json) {
dosage = json['dosage'];
quantity = json['quantity'];
suppliesInWarehouseId = json['suppliesInWarehouseId'];
}

Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['dosage'] = this.dosage;
data['quantity'] = this.quantity;
data['suppliesInWarehouseId'] = this.suppliesInWarehouseId;
return data;
}
}

+ 52
- 0
lib/custom_model/Sell.dart View File

class Sell {
int id;
int activityId;
int harvestId;
String executeDate;
String description;
num quantityLv1;
num quantityLv2;
num quantityLv3;
num removedQuantity;
String buyer;

Sell(
{this.id,
this.activityId,
this.harvestId,
this.executeDate,
this.description,
this.quantityLv1,
this.quantityLv2,
this.quantityLv3,
this.removedQuantity,
this.buyer});

Sell.fromJson(Map<String, dynamic> json) {
id = json['id'];
activityId = json['activityId'];
harvestId = json['harvestId'];
executeDate = json['executeDate'];
description = json['description'];
quantityLv1 = json['quantityLv1'];
quantityLv2 = json['quantityLv2'];
quantityLv3 = json['quantityLv3'];
removedQuantity = json['removedQuantity'];
buyer = json['buyer'];
}

Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['activityId'] = this.activityId;
data['harvestId'] = this.harvestId;
data['executeDate'] = this.executeDate;
data['description'] = this.description;
data['quantityLv1'] = this.quantityLv1;
data['quantityLv2'] = this.quantityLv2;
data['quantityLv3'] = this.quantityLv3;
data['removedQuantity'] = this.removedQuantity;
data['buyer'] = this.buyer;
return data;
}
}

+ 58
- 0
lib/custom_model/Spraying.dart View File

import 'SuppliesUsing.dart';

class Spraying {
int id;
int cropId;
String executeDate;
String description;
int quarantinePeriod;
String weatherConditions;
String resultAt;
String purpose;
List<SuppliesUsing> suppliesUsing;

Spraying(
{this.id,
this.cropId,
this.executeDate,
this.description,
this.quarantinePeriod,
this.weatherConditions,
this.resultAt,
this.purpose,
this.suppliesUsing});

Spraying.fromJson(Map<String, dynamic> json) {
id = json['id'];
cropId = json['cropId'];
executeDate = json['executeDate'];
description = json['description'];
quarantinePeriod = json['quarantinePeriod'];
weatherConditions = json['weatherConditions'];
resultAt = json['resultAt'];
purpose = json['purpose'];
if (json['suppliesUsing'] != null) {
suppliesUsing = new List<SuppliesUsing>();
json['suppliesUsing'].forEach((v) {
suppliesUsing.add(new SuppliesUsing.fromJson(v));
});
}
}

Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['cropId'] = this.cropId;
data['executeDate'] = this.executeDate;
data['description'] = this.description;
data['quarantinePeriod'] = this.quarantinePeriod;
data['weatherConditions'] = this.weatherConditions;
data['resultAt'] = this.resultAt;
data['purpose'] = this.purpose;
if (this.suppliesUsing != null) {
data['suppliesUsing'] =
this.suppliesUsing.map((v) => v.toJson()).toList();
}
return data;
}
}

+ 36
- 0
lib/custom_model/SuppliesUsing.dart View File

class SuppliesUsing {
int id;
String dosage;
int quantity;
String howToUse;
int suppliesInWarehouseId;
int equipmentOfCustomerId;

SuppliesUsing(
{this.id,
this.dosage,
this.quantity,
this.howToUse,
this.suppliesInWarehouseId,
this.equipmentOfCustomerId});

SuppliesUsing.fromJson(Map<String, dynamic> json) {
id = json['id'];
dosage = json['dosage'];
quantity = json['quantity'];
howToUse = json['howToUse'];
suppliesInWarehouseId = json['suppliesInWarehouseId'];
equipmentOfCustomerId = json['equipmentOfCustomerId'];
}

Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['dosage'] = this.dosage;
data['quantity'] = this.quantity;
data['howToUse'] = this.howToUse;
data['suppliesInWarehouseId'] = this.suppliesInWarehouseId;
data['equipmentOfCustomerId'] = this.equipmentOfCustomerId;
return data;
}
}

+ 36
- 0
lib/custom_model/UseWater.dart View File

class UseWater {
int id;
int cropId;
String executeDate;
String description;
String waterType;
num amount;

UseWater(
{this.id,
this.cropId,
this.executeDate,
this.description,
this.waterType,
this.amount});

UseWater.fromJson(Map<String, dynamic> json) {
id = json['id'];
cropId = json['cropId'];
executeDate = json['executeDate'];
description = json['description'];
waterType = json['waterType'];
amount = json['amount'];
}

Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['cropId'] = this.cropId;
data['executeDate'] = this.executeDate;
data['description'] = this.description;
data['waterType'] = this.waterType;
data['amount'] = this.amount;
return data;
}
}

+ 14
- 0
lib/presentation/screens/actions/disease/sc_edit_action_disease.dart View File

import 'package:flutter/material.dart';

class EditActionDiseaseScreen extends StatefulWidget {
@override
_EditActionDiseaseScreenState createState() =>
_EditActionDiseaseScreenState();
}

class _EditActionDiseaseScreenState extends State<EditActionDiseaseScreen> {
@override
Widget build(BuildContext context) {
return Container();
}
}

+ 13
- 0
lib/presentation/screens/actions/dung/sc_edit_action_dung.dart View File

import 'package:flutter/material.dart';

class EditActionDungScreen extends StatefulWidget {
@override
_EditActionDungScreenState createState() => _EditActionDungScreenState();
}

class _EditActionDungScreenState extends State<EditActionDungScreen> {
@override
Widget build(BuildContext context) {
return Container();
}
}

+ 13
- 0
lib/presentation/screens/actions/end/sc_edit_action_end.dart View File

import 'package:flutter/material.dart';

class EditActionEndScreen extends StatefulWidget {
@override
_EditActionEndScreenState createState() => _EditActionEndScreenState();
}

class _EditActionEndScreenState extends State<EditActionEndScreen> {
@override
Widget build(BuildContext context) {
return Container();
}
}

+ 15
- 0
lib/presentation/screens/actions/environment_update/sc_edit_action_environment_update.dart View File

import 'package:flutter/material.dart';

class EditActionEnvironmentUpdate extends StatefulWidget {
@override
_EditActionEnvironmentUpdateState createState() =>
_EditActionEnvironmentUpdateState();
}

class _EditActionEnvironmentUpdateState
extends State<EditActionEnvironmentUpdate> {
@override
Widget build(BuildContext context) {
return Container();
}
}

+ 14
- 0
lib/presentation/screens/actions/harvest/sc_edit_action_harvest.dart View File

import 'package:flutter/material.dart';

class EditActionHarvestScreen extends StatefulWidget {
@override
_EditActionHarvestScreenState createState() =>
_EditActionHarvestScreenState();
}

class _EditActionHarvestScreenState extends State<EditActionHarvestScreen> {
@override
Widget build(BuildContext context) {
return Container();
}
}

+ 15
- 0
lib/presentation/screens/actions/harvest_process/sc_edit_action_harvest_process.dart View File

import 'package:flutter/material.dart';

class EditActionHarvestProcessScreen extends StatefulWidget {
@override
_EditActionHarvestProcessScreenState createState() =>
_EditActionHarvestProcessScreenState();
}

class _EditActionHarvestProcessScreenState
extends State<EditActionHarvestProcessScreen> {
@override
Widget build(BuildContext context) {
return Container();
}
}

+ 14
- 0
lib/presentation/screens/actions/packing/sc_edit_action_packing.dart View File

import 'package:flutter/material.dart';

class EditActionPackingScreen extends StatefulWidget {
@override
_EditActionPackingScreenState createState() =>
_EditActionPackingScreenState();
}

class _EditActionPackingScreenState extends State<EditActionPackingScreen> {
@override
Widget build(BuildContext context) {
return Container();
}
}

+ 13
- 0
lib/presentation/screens/actions/sell/sc_edit_action_sell.dart View File

import 'package:flutter/material.dart';

class EditActionSellScreen extends StatefulWidget {
@override
_EditActionSellScreenState createState() => _EditActionSellScreenState();
}

class _EditActionSellScreenState extends State<EditActionSellScreen> {
@override
Widget build(BuildContext context) {
return Container();
}
}

+ 14
- 0
lib/presentation/screens/actions/spraying/sc_edit_action_spraying.dart View File

import 'package:flutter/material.dart';

class EditActionSprayingScreen extends StatefulWidget {
@override
_EditActionSprayingScreenState createState() =>
_EditActionSprayingScreenState();
}

class _EditActionSprayingScreenState extends State<EditActionSprayingScreen> {
@override
Widget build(BuildContext context) {
return Container();
}
}

+ 14
- 0
lib/presentation/screens/actions/use_water/sc_edit_action_user_water.dart View File

import 'package:flutter/material.dart';

class EditActionUseWaterScreen extends StatefulWidget {
@override
_EditActionUseWaterScreenState createState() =>
_EditActionUseWaterScreenState();
}

class _EditActionUseWaterScreenState extends State<EditActionUseWaterScreen> {
@override
Widget build(BuildContext context) {
return Container();
}
}

Loading…
Cancel
Save