class PositionModel {
  List<PositionDetailModel> records;
  int total;
  int size;
  int current;
  bool searchCount;
  int pages;

  PositionModel(
      {this.records,
      this.total,
      this.size,
      this.current,
      this.searchCount,
      this.pages});

  PositionModel.fromJson(Map<String, dynamic> json) {
    if (json['records'] != null) {
      records = new List<PositionDetailModel>();
      json['records'].forEach((v) {
        records.add(new PositionDetailModel.fromJson(v));
      });
    }
    total = json['total'];
    size = json['size'];
    current = json['current'];
    searchCount = json['searchCount'];
    pages = json['pages'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.records != null) {
      data['records'] = this.records.map((v) => v.toJson()).toList();
    }
    data['total'] = this.total;
    data['size'] = this.size;
    data['current'] = this.current;
    data['searchCount'] = this.searchCount;
    data['pages'] = this.pages;
    return data;
  }
}

class PositionDetailModel {
  int id;
  int createTime;
  String createBy;
  int updateTime;
  String updateBy;
  String job;
  double upperSalary;
  double lowerSalary;
  int upperWorking;
  int lowerWorking;
  int eduLevel;
  String address;
  int companyId;
  String info;
  int favoriteNum;
  int isFavorite;
  int favoriteId;
  int likeNum;
  int browseNum;
  int isApply;
  int hotFlag;
  int checkFlag;
  int sort;
  int statuz;
  String reason;
  Company company;
  String typeName;
  String eduName;
  String provinceName;
  String cityName;

  PositionDetailModel(
      {this.id,
      this.createTime,
      this.provinceName,
      this.cityName,
      this.createBy,
      this.updateTime,
      this.updateBy,
      this.job,
      this.upperSalary,
      this.lowerSalary,
      this.upperWorking,
      this.lowerWorking,
      this.eduLevel,
      this.address,
      this.companyId,
      this.info,
      this.favoriteNum,
      this.isFavorite,
      this.favoriteId,
      this.likeNum,
      this.browseNum,
      this.isApply,
      this.hotFlag,
      this.checkFlag,
      this.sort,
      this.statuz,
      this.reason,
      this.typeName,
      this.eduName,
      this.company});

  PositionDetailModel.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    createTime = json['createTime'];
    provinceName = json['provinceName'];
    cityName = json['cityName'];
    createBy = json['createBy'];
    updateTime = json['updateTime'];
    updateBy = json['updateBy'];
    job = json['job'];
    upperSalary = json['upperSalary'];
    lowerSalary = json['lowerSalary'];
    upperWorking = json['upperWorking'];
    lowerWorking = json['lowerWorking'];
    eduLevel = json['eduLevel'];
    address = json['address'];
    companyId = json['companyId'];
    info = json['info'];
    favoriteNum = json['favoriteNum'];
    isFavorite = json['isFavorite'];
    favoriteId = json['favoriteId'];
    likeNum = json['likeNum'];
    browseNum = json['browseNum'];
    isApply = json['isApply'];
    hotFlag = json['hotFlag'];
    checkFlag = json['checkFlag'];
    sort = json['sort'];
    statuz = json['statuz'];
    reason = json['reason'];
    typeName = json['typeName'];
    eduName = json['eduName'];
    company =
        json['company'] != null ? new Company.fromJson(json['company']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['createTime'] = this.createTime;
    data['provinceName'] = this.provinceName;
    data['cityName'] = this.cityName;
    data['createBy'] = this.createBy;
    data['updateTime'] = this.updateTime;
    data['updateBy'] = this.updateBy;
    data['job'] = this.job;
    data['upperSalary'] = this.upperSalary;
    data['lowerSalary'] = this.lowerSalary;
    data['upperWorking'] = this.upperWorking;
    data['lowerWorking'] = this.lowerWorking;
    data['eduLevel'] = this.eduLevel;
    data['address'] = this.address;
    data['companyId'] = this.companyId;
    data['info'] = this.info;
    data['favoriteNum'] = this.favoriteNum;
    data['isFavorite'] = this.isFavorite;
    data['favoriteId'] = this.favoriteId;
    data['likeNum'] = this.likeNum;
    data['browseNum'] = this.browseNum;
    data['isApply'] = this.isApply;
    data['hotFlag'] = this.hotFlag;
    data['checkFlag'] = this.checkFlag;
    data['sort'] = this.sort;
    data['statuz'] = this.statuz;
    data['reason'] = this.reason;
    data['typeName'] = this.typeName;
    data['eduName'] = this.eduName;
    if (this.company != null) {
      data['company'] = this.company.toJson();
    }
    return data;
  }
}

class Company {
  int id;
  int createTime;
  String createBy;
  int updateTime;
  String updateBy;
  String name;
  String address;
  double registeredCapital;
  String corporator;
  String telephone;
  String mainbusiness;
  String businessLicenseCode;
  String businessLicenseAnnex;
  String remarks;
  int isCertificated;
  int status;
  int limitedNum;
  int serviceTotal;
  int satisfactionTotal;
  int serviceCount;
  int level;
  String logoImg;
  int maintenanceTotal;
  int emergencyTotal;
  int liftTotal;
  int isClock;
  int topTime;
  int downTime;
  int isUpdown;
  int vipFlag;
  String topTimePm;
  String downTimePm;
  String topTimeOt;
  String downTimeOt;
  String provinceCode;
  int type;
  String companySize;

  Company(
      {this.id,
      this.createTime,
      this.createBy,
      this.updateTime,
      this.updateBy,
      this.name,
      this.address,
      this.registeredCapital,
      this.corporator,
      this.telephone,
      this.mainbusiness,
      this.businessLicenseCode,
      this.businessLicenseAnnex,
      this.remarks,
      this.isCertificated,
      this.status,
      this.limitedNum,
      this.serviceTotal,
      this.satisfactionTotal,
      this.serviceCount,
      this.level,
      this.logoImg,
      this.maintenanceTotal,
      this.emergencyTotal,
      this.liftTotal,
      this.isClock,
      this.topTime,
      this.downTime,
      this.isUpdown,
      this.vipFlag,
      this.topTimePm,
      this.downTimePm,
      this.topTimeOt,
      this.downTimeOt,
      this.provinceCode,
      this.type,
      this.companySize});

  Company.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    createTime = json['createTime'];
    createBy = json['createBy'];
    updateTime = json['updateTime'];
    updateBy = json['updateBy'];
    name = json['name'];
    address = json['address'];
    registeredCapital = json['registeredCapital'];
    corporator = json['corporator'];
    telephone = json['telephone'];
    mainbusiness = json['mainbusiness'];
    businessLicenseCode = json['businessLicenseCode'];
    businessLicenseAnnex = json['businessLicenseAnnex'];
    remarks = json['remarks'];
    isCertificated = json['isCertificated'];
    status = json['status'];
    limitedNum = json['limitedNum'];
    serviceTotal = json['serviceTotal'];
    satisfactionTotal = json['satisfactionTotal'];
    serviceCount = json['serviceCount'];
    level = json['level'];
    logoImg = json['logoImg'];
    maintenanceTotal = json['maintenanceTotal'];
    emergencyTotal = json['emergencyTotal'];
    liftTotal = json['liftTotal'];
    isClock = json['isClock'];
    topTime = json['topTime'];
    downTime = json['downTime'];
    isUpdown = json['isUpdown'];
    vipFlag = json['vipFlag'];
    topTimePm = json['topTimePm'];
    downTimePm = json['downTimePm'];
    topTimeOt = json['topTimeOt'];
    downTimeOt = json['downTimeOt'];
    provinceCode = json['provinceCode'];
    type = json['type'];
    companySize = json['companySize'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['createTime'] = this.createTime;
    data['createBy'] = this.createBy;
    data['updateTime'] = this.updateTime;
    data['updateBy'] = this.updateBy;
    data['name'] = this.name;
    data['address'] = this.address;
    data['registeredCapital'] = this.registeredCapital;
    data['corporator'] = this.corporator;
    data['telephone'] = this.telephone;
    data['mainbusiness'] = this.mainbusiness;
    data['businessLicenseCode'] = this.businessLicenseCode;
    data['businessLicenseAnnex'] = this.businessLicenseAnnex;
    data['remarks'] = this.remarks;
    data['isCertificated'] = this.isCertificated;
    data['status'] = this.status;
    data['limitedNum'] = this.limitedNum;
    data['serviceTotal'] = this.serviceTotal;
    data['satisfactionTotal'] = this.satisfactionTotal;
    data['serviceCount'] = this.serviceCount;
    data['level'] = this.level;
    data['logoImg'] = this.logoImg;
    data['maintenanceTotal'] = this.maintenanceTotal;
    data['emergencyTotal'] = this.emergencyTotal;
    data['liftTotal'] = this.liftTotal;
    data['isClock'] = this.isClock;
    data['topTime'] = this.topTime;
    data['downTime'] = this.downTime;
    data['isUpdown'] = this.isUpdown;
    data['vipFlag'] = this.vipFlag;
    data['topTimePm'] = this.topTimePm;
    data['downTimePm'] = this.downTimePm;
    data['topTimeOt'] = this.topTimeOt;
    data['downTimeOt'] = this.downTimeOt;
    data['provinceCode'] = this.provinceCode;
    data['type'] = this.type;
    data['companySize'] = this.companySize;
    return data;
  }
}
