package org.springblade.gateway.common_gateway.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.DecimalMin;
import java.math.BigDecimal;
import java.util.List;

/**
 * @Author: Silent
 * @Description
 * @Date: Created in 16:54 2021/11/9
 * @Modified By:
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel("活动设置")
public class ActiveSettingDto {
	@ApiModelProperty("主页标题")
	private String indexTitle;

	@ApiModelProperty("功能按钮")
	private List<ImageItem> functionItemList;

	@ApiModelProperty("主页轮播图")
	private List<ImageItem> indexImageList;

	@ApiModelProperty("授权标题")
	private String cmccAuthTitle;

	@ApiModelProperty("授权内容")
	private String cmccAuthContent;

	@ApiModelProperty("热力值/票")
	@DecimalMin("0")
	private BigDecimal voteAndHeatRate;

	@ApiModelProperty("普法积分值/票")
	@DecimalMin("0")
	private BigDecimal voteAndPointRate;

	@ApiModelProperty("排行显示总数")
	private Long rankTotal;

	@ApiModelProperty("我的作品图片")
	private String myProductImage;

	@ApiModelProperty("分享参数")
	private ShareParam shareParam;

	@ApiModelProperty("拉票参数")
	private PullVoteParam pullVoteParam;

	@ApiModelProperty("助力说明")
	private List<String> helpExplainList;

	@ApiModelProperty("主题颜色")
	private Theme theme;

	@ApiModelProperty("导航图标")
	private List<NavigationItem> navigationList;

	@ApiModel("分享参数")
	@Data
	@AllArgsConstructor
	@NoArgsConstructor
	public static class ShareParam{
		@ApiModelProperty("分享标题")
		private String title;
		@ApiModelProperty("分享描述")
		private String desc;
		@ApiModelProperty("分享图片")
		private String imgUrl;
	}

	@ApiModel("拉票参数")
	@Data
	@AllArgsConstructor
	@NoArgsConstructor
	public static class PullVoteParam{
		@ApiModelProperty("标题")
		private String title;
		@ApiModelProperty("主办方")
		private String sponsor;
	}

	@ApiModel("功能按钮")
	@Data
	@AllArgsConstructor
	@NoArgsConstructor
	public static class ImageItem{
		@ApiModelProperty("图片地址")
		private String url;

		@ApiModelProperty("类型")
		private String type;

		@ApiModelProperty("需要跳转的地址")
		private String path;
	}

	@ApiModel("轮播图选项")
	@Data
	@AllArgsConstructor
	@NoArgsConstructor
	public static class FunctionItem {
		@ApiModelProperty("图片地址")
		private String icon;

		@ApiModelProperty("名称")
		private String name;

		@ApiModelProperty("需要跳转的地址")
		private String path;

		@ApiModelProperty("是否展示")
		private String show;
	}

	@ApiModel("主题颜色配置")
	@Data
	@AllArgsConstructor
	@NoArgsConstructor
	public static class Theme {
		@ApiModelProperty("开启")
		private Boolean enable;

		@ApiModelProperty("基础颜色")
		private String baseColor;

		@ApiModelProperty("商城背景颜色")
		private String shopBg;

		@ApiModelProperty("规则背景")
		private String ruleBg;

		@ApiModelProperty("排行背景")
		private String rankBgImg;
	}

	@ApiModel("轮播图选项")
	@Data
	@AllArgsConstructor
	@NoArgsConstructor
	public static class NavigationItem {
		@ApiModelProperty("图标")
		private String icon;

		@ApiModelProperty("名称")
		private String name;

		@ApiModelProperty("需要跳转的地址")
		private String path;

		@ApiModelProperty("颜色")
		private String color;
	}
}
