package com.njcn.system.pojo.param;

import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.web.constant.ValidMessage;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.List;

/**
 * 类的介绍：
 *
 * @author xuyang
 * @version 1.0.0
 * @createTime 2022/1/12 13:45
 */
@Data
public class ThemeParam implements Serializable {

    @ApiModelProperty("主题名称")
    @NotBlank(message = ValidMessage.NAME_NOT_BLANK)
    @Pattern(regexp = PatternRegex.NORMAL, message = ValidMessage.NAME_FORMAT_ERROR)
    private String name;

    @ApiModelProperty("主题描述")
    @Pattern(regexp = PatternRegex.NORMAL, message = ValidMessage.REMARK_FORMAT_ERROR)
    private String remark;

    @ApiModelProperty("主题颜色")
    @NotBlank(message = ValidMessage.COLOR_NOT_BLANK)
    @Pattern(regexp = PatternRegex.COLOR_REGEX, message = ValidMessage.COLOR_FORMAT_ERROR)
    private String color;

    @ApiModelProperty("logo图片")
    @NotNull(message = ValidMessage.LOGO_NOT_BLANK)
    private MultipartFile logoFile;

    @ApiModelProperty("favicon图标")
    @NotNull(message = ValidMessage.FAVICON_NOT_BLANK)
    private MultipartFile faviconFile;

    @ApiModelProperty("切换栏位置")
    private String mainAnimation;

    @ApiModelProperty("主键主题色")
    private List<String> elementUiPrimary;

    @ApiModelProperty("表格标题背景颜色")
    private List<String> tableHeaderBackground;

    @ApiModelProperty("表格标题文字颜色")
    private List<String> tableHeaderColor;

    @ApiModelProperty("表格激活颜色")
    private List<String> tableCurrent;

    @ApiModelProperty("侧边菜单背景色")
    private List<String> menuBackground;

    @ApiModelProperty("侧边菜单文字颜色")
    private List<String> menuColor;

    @ApiModelProperty("侧边菜单激活项背景色")
    private List<String> menuActiveBackground;

    @ApiModelProperty("侧边菜单激活项文字色")
    private List<String> menuActiveColor;

    @ApiModelProperty("侧边菜单顶栏背景色")
    private List<String> menuTopBarBackground;

    @ApiModelProperty("顶栏文字色")
    private List<String> headerBarTabColor;

    @ApiModelProperty("顶栏背景色")
    private List<String> headerBarBackground;

    /**
     * 用户更新操作实体
     * <p>
     * 需要填写的参数：用户的id
     */
    @Data
    @EqualsAndHashCode(callSuper = true)
    public static class ThemeUpdateParam extends ThemeParam {

        @ApiModelProperty("主题表Id")
        @NotBlank(message = ValidMessage.ID_NOT_BLANK)
        @Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
        private String id;
    }

}
