import { Data } from './../Data';
import { IPlayToyDetailData } from './IPlayToyDetailData';
export class VisitDetailData extends Data {
    /**
     * 宠物id
     */
    public id: number;

    /**
     * 宠物唯一标识
     */
    public identifier: string;

    /**
     * 宠物头像
     */
    public petAvatar: string;
    
    /**
     * 宠物头像大图
     */
    public petAvatarBig: string;

    /**
     * 描述
     */
    public petDesc: string;

    /**
     * 宠物名字
     */
    public petName: string;

    /**
     * 玩玩具记录
     */
    public playToyDetail: IPlayToyDetailData[];

    /**
     * 来访次数
     */
    public visitTimes: number;
    public update(result: any): void {
        if (!result) {
            return;
        }
        super.update(result);
        if (result.data) {
            this.id = result.data.id;
            this.identifier = result.data.identifier;
            this.petAvatar = result.data.petAvatar;
            this.petAvatarBig = result.data.petAvatarBig;
            this.petDesc = result.data.petDesc;
            this.petName = result.data.petName;
            this.playToyDetail = result.data.playToyDetail;
            this.visitTimes = result.data.visitTimes;
        }
    }
}