/**
 *Created by cuiliqiang on 2018/3/13
 * 中奖前置数据
 */
import { Data } from "../../Data";

export class GetOrderInfoData extends Data {
    /**
     * 状态 0，101 处理中 2处理成功
     */
    public result: number;

    /**
     * 奖品类型
     */
    public type: string;

    /**
     * 用户虚拟积分可达到的阈值 未中奖返回-1
     */
    public facePrice: number;

    /**
     * 前端缓存到后端的数据
     */
    public cacheInfo: any;

    /**
     * 订单ID
     */
    public orderId: number;

    /**
     * 标题
     */
    public title: string;

    public update(data: any): void {
        if (!data) {
            return;
        }
        this.result = data.result;
        this.type = data.type;
        this.facePrice = data.facePrice;
        this.cacheInfo = data.cacheInfo;
        this.orderId = data.orderId;
        this.title = data.title;
    }
}
