import 'dart:core';

class Job {
  //地址
  String? address;
  //预约时间
  String? appointmentDate;
  //作业面积
  String? area;
  //费用
  int? charges;
  //创建时间
  String? createDate;
//  创建人
  String? createUser;
//  调度ID
  String? dispatchId;
//  结束时间
  String? endDate;
//  作业ID
  String? jobId;
//  农机ID
  String? machineryId;
//  农机名称
  String? machineryName;
//  农机型号Id
  String? machineryTypeId;
//  农机型号名称
  String? machineryTypeName;
//  下单时间
  String? orderDate;
//  订单ID
  String? orderId;
//  订单号
  String? orderNo;
//  机构ID
  String? orgId;
//  机构名称
  String? orgName;
//  下单人Id
  String? personId;
//  下单人名称
  String? personName;
//  下单人手机号
  String? phone;
//  区域ID
  String? regionId;
//  开始时间
  String? startDate;
//  状态
  int? status;
//  作业类型
  String? typeId;
//  农机手ID
  String? workerId;
//  农机手名称
  String? workerName;

  Job();

  Job.fromJson(Map<String, dynamic> json)
      : jobId = json["jobId"],
        dispatchId = json["dispatchId"],
        orderId = json["orderId"],
        workerId = json["workerId"],
        machineryId = json["machineryId"],
        startDate = json["startDate"],
        endDate = json["endDate"],
        regionId = json["regionId"],
        typeId = json["typeId"],
        area = json["area"],
        orgId = json["orgId"],
        status = json["status"],
        createUser = json["createUser"],
        createDate = json["createDate"],
        orderNo = json["orderNo"],
        personId = json["personId"],
        personName = json["personName"],
        phone = json["phone"],
        address = json["address"],
        charges = json["charges"],
        appointmentDate = json["appointmentDate"],
        orderDate = json["orderDate"],
        workerName = json["workerName"],
        machineryName = json["machineryName"],
        orgName = json["orgName"],
        machineryTypeId = json["machineryTypeId"],
        machineryTypeName = json["machineryTypeName"];

  Map<String, dynamic> toJson() => {
        'jobId': jobId,
        'dispatchId': dispatchId,
        'orderId': orderId,
        'workerId': workerId,
        'machineryId': machineryId,
        'startDate': startDate,
        'endDate': endDate,
        'regionId': regionId,
        'typeId': typeId,
        'area': area,
        'orgId': orgId,
        'status': status,
        'createUser': createUser,
        'createDate': createDate,
        'orderNo': orderNo,
        'personId': personId,
        'personName': personName,
        'phone': phone,
        'address': address,
        'charges': charges,
        'appointmentDate': appointmentDate,
        'orderDate': orderDate,
        'workerName': workerName,
        'machineryName': machineryName,
        'orgName': orgName,
        'machineryTypeId': machineryTypeId,
        'machineryTypeName': machineryTypeName,
      };
}
