package com.gameplatform.server.model.dto.link;

import io.swagger.v3.oas.annotations.media.Schema;

/**
 * 轮询上号接口响应
 */
@Schema(description = "轮询上号接口响应")
public class PollLoginResponse {
    
    @Schema(description = "是否上号成功", example = "false")
    private boolean success;
    
    @Schema(description = "当前状态", example = "USING")
    private String status;
    
    @Schema(description = "前端渲染建议", example = "SECOND")
    private String view;
    
    @Schema(description = "静态资源信息")
    private AssetsInfo assets;
    
    public PollLoginResponse() {
    }
    
    public PollLoginResponse(boolean success, String status) {
        this.success = success;
        this.status = status;
    }
    
    public PollLoginResponse(boolean success, String status, String view, AssetsInfo assets) {
        this.success = success;
        this.status = status;
        this.view = view;
        this.assets = assets;
    }
    
    public boolean isSuccess() {
        return success;
    }
    
    public void setSuccess(boolean success) {
        this.success = success;
    }
    
    public String getStatus() {
        return status;
    }
    
    public void setStatus(String status) {
        this.status = status;
    }
    
    public String getView() {
        return view;
    }
    
    public void setView(String view) {
        this.view = view;
    }
    
    public AssetsInfo getAssets() {
        return assets;
    }
    
    public void setAssets(AssetsInfo assets) {
        this.assets = assets;
    }
    
    /**
     * 静态资源信息
     */
    @Schema(description = "静态资源信息")
    public static class AssetsInfo {
        
        @Schema(description = "资源基础URL", example = "http://36.138.184.60:12345/ABC123/")
        private String base;
        
        @Schema(description = "首次主页图片", example = "首次主页.png")
        private String firstHome;
        
        @Schema(description = "首次赏金图片", example = "首次赏金.png")
        private String firstBonus;
        
        @Schema(description = "中途赏金图片", example = "中途赏金.png")
        private String midBonus;
        
        @Schema(description = "结束赏金图片", example = "结束赏金.png")
        private String endBonus;
        
        public AssetsInfo() {
        }
        
        public AssetsInfo(String base) {
            this.base = base;
            this.firstHome = "首次主页.png";
            this.firstBonus = "首次赏金.png";
            this.midBonus = "中途赏金.png";
            this.endBonus = "结束赏金.png";
        }
        
        public String getBase() {
            return base;
        }
        
        public void setBase(String base) {
            this.base = base;
        }
        
        public String getFirstHome() {
            return firstHome;
        }
        
        public void setFirstHome(String firstHome) {
            this.firstHome = firstHome;
        }
        
        public String getFirstBonus() {
            return firstBonus;
        }
        
        public void setFirstBonus(String firstBonus) {
            this.firstBonus = firstBonus;
        }
        
        public String getMidBonus() {
            return midBonus;
        }
        
        public void setMidBonus(String midBonus) {
            this.midBonus = midBonus;
        }
        
        public String getEndBonus() {
            return endBonus;
        }
        
        public void setEndBonus(String endBonus) {
            this.endBonus = endBonus;
        }
    }
}
