"use strict";
var __reflect = (this && this.__reflect) || function (p, c, t) {
    p.__class__ = c, t ? t.push(c) : t = [c], p.__types__ = p.__types__ ? t.concat(p.__types__) : t;
};
Object.defineProperty(exports, "__esModule", { value: true });
// import { IData } from "../../tc/interface/IData";
/**
 *Created by cuiliqiang on 2018/3/12
 * 数据基类
 */
var Data = (function () {
    function Data() {
    }
    Data.prototype.update = function (data) {
        this._success = data.success == undefined ? true : data.success;
        if (data.message) {
            this._message = data.message;
        }
        else if (data.desc) {
            this._message = data.desc;
        }
        else if (data.msg) {
            this._message = data.msg;
        }
        this._code = data.code;
    };
    Object.defineProperty(Data.prototype, "success", {
        /**
         * 接口状态
         * @returns {boolean}
         */
        get: function () {
            return this._success;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Data.prototype, "message", {
        /**
         * 接口提示信息
         * @returns {string}
         */
        get: function () {
            return this._message;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(Data.prototype, "code", {
        /**
         * 状态码
         * @returns {string}
         */
        get: function () {
            return this._code;
        },
        enumerable: true,
        configurable: true
    });
    return Data;
}());
exports.Data = Data;
__reflect(Data.prototype, "\"c:/Users/duiba/Documents/zhonghe_answer/egret/libs/tw/data/Data\".Data", ["\"c:/Users/duiba/Documents/zhonghe_answer/egret/libs/tc/interface/IData\".IData"]);
//# sourceMappingURL=Data.js.map