"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.createAddress = createAddress;
exports.ERROR_OK = void 0;

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

var Address = function Address(_ref) {
  var id = _ref.id,
      adcode = _ref.adcode,
      address = _ref.address,
      city = _ref.city,
      district = _ref.district,
      name = _ref.name,
      typecode = _ref.typecode;

  _classCallCheck(this, Address);

  this.id = id;
  this.adcode = adcode;
  this.address = address;
  this.city = city;
  this.district = district;
  this.name = name;
  this.typecode;
};

var ERROR_OK = '10000';
exports.ERROR_OK = ERROR_OK;

function createAddress(data) {
  return new Address({
    id: data.id,
    adcode: data.adcode,
    address: data.address,
    city: data.city,
    district: data.district,
    name: data.name,
    typecode: data.typecode
  });
}