"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;
};
var __extends = this && this.__extends || function __extends(t, e) { 
 function r() { 
 this.constructor = t;
}
for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i]);
r.prototype = e.prototype, t.prototype = new r();
};
Object.defineProperty(exports, "__esModule", { value: true });
/**
 *Created by ck on 2018/5/2
 */
var Data_1 = require("../Data");
var PetIndexData = (function (_super) {
    __extends(PetIndexData, _super);
    function PetIndexData() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        /**
         * 积分
         */
        _this.credits = 0;
        /**
         * appId
         */
        _this.appId = 0;
        /**
         * 用户自定义参数
         */
        _this.dcustom = {};
        /**
         * 活动id
         */
        _this.activityId = 0;
        /**
         * 用户id
         */
        _this.consumerId = 0;
        return _this;
    }
    PetIndexData.prototype.update = function (result) {
        if (!result) {
            return;
        }
        if (result.credits) {
            this.credits = result.credits;
        }
        if (result.creditsUnitName) {
            this.creditsUnitName = result.creditsUnitName;
        }
        if (result.partnerUserId) {
            this.partnerUserId = result.partnerUserId;
        }
        if (result.appId) {
            this.appId = result.appId;
        }
        if (result.currentTime) {
            this.currentTime = result.currentTime;
        }
        if (result.notLogin) {
            this.notLogin = result.notLogin;
        }
        if (result.goodsDomain) {
            this.goodsDomain = result.goodsDomain;
        }
        if (result.homeDomain) {
            this.homeDomain = result.homeDomain;
        }
        if (result.embedDomain) {
            this.embedDomain = result.embedDomain;
        }
        if (result.openLogin) {
            this.openLogin = result.openLogin;
        }
        if (result.loginProgram) {
            this.loginProgram = result.loginProgram;
        }
        if (result.dcustom) {
            this.dcustom = result.dcustom;
        }
        if (!isNaN(result.activityId)) {
            this.activityId = result.activityId;
        }
        if (!isNaN(result.consumerId)) {
            this.consumerId = result.consumerId;
        }
        // if(!this.petHomeInfo) {
        //     this.petHomeInfo = new PetHomeInfoData();
        // }
        // this.petHomeInfo.update(result.data);
    };
    return PetIndexData;
}(Data_1.Data));
exports.PetIndexData = PetIndexData;
__reflect(PetIndexData.prototype, "\"/Users/chiwang/Desktop/\u5151\u5427\u5DE5\u4F5C/newGame/saolei19.03.06/db-game-template/egret/libs/tw/data/pet/PetIndexData\".PetIndexData");
//# sourceMappingURL=PetIndexData.js.map