package com.platform.modules.live.dto;

import lombok.Data;
import net.sf.json.JSONObject;

/**
 * @Description: 查询导播台响应信息
 * @Author: yikaihong
 * @CreateDate: 2019/1/20 16:58
 * @Version: 1.0
 */
@Data
public class DescribeCastersResponseDto {

    private String casterId;
    private String casterName;
    private String createTime;
    private String startTime;
    private String normType;
    private String chargeType;
    private String purchaseTime;
    private String expireTime;
    private String casterTemplate;
    private String status;
    private String channelEnable;


    public DescribeCastersResponseDto(String casterId, String casterName, String createTime, String startTime, String normType, String chargeType, String purchaseTime, String expireTime, String casterTemplate, String status, String channelEnable) {
        this.casterId = casterId;
        this.casterName = casterName;
        this.createTime = createTime;
        this.startTime = startTime;
        this.normType = normType;
        this.chargeType = chargeType;
        this.purchaseTime = purchaseTime;
        this.expireTime = expireTime;
        this.casterTemplate = casterTemplate;
        this.status = status;
        this.channelEnable = channelEnable;
    }

    public DescribeCastersResponseDto() {

    }

    public DescribeCastersResponseDto(JSONObject jsonObject) {
        if (jsonObject.containsKey("CasterId")) {
            this.casterId = jsonObject.getString("CasterId");
        }
        if (jsonObject.containsKey("CasterName")) {
            this.casterName = jsonObject.getString("CasterName");
        }
        if (jsonObject.containsKey("CreateTime")) {
            this.createTime = jsonObject.getString("CreateTime");
        }
        if (jsonObject.containsKey("StartTime")) {
            this.startTime = jsonObject.getString("StartTime");
        }
        if (jsonObject.containsKey("NormType")) {
            this.normType = jsonObject.getString("NormType");
        }
        if (jsonObject.containsKey("ChargeType")) {
            this.chargeType = jsonObject.getString("ChargeType");
        }
        if (jsonObject.containsKey("PurchaseTime")) {
            this.purchaseTime = jsonObject.getString("PurchaseTime");
        }
        if (jsonObject.containsKey("ExpireTime")) {
            this.expireTime = jsonObject.getString("ExpireTime");
        }
        if (jsonObject.containsKey("CasterTemplate")) {
            this.casterTemplate = jsonObject.getString("CasterTemplate");
        }
        if (jsonObject.containsKey("Status")) {
            this.status = jsonObject.getString("Status");
        }
        if (jsonObject.containsKey("ChannelEnable")) {
            this.channelEnable = jsonObject.getString("ChannelEnable");
        }
    }
}