package com.gxwebsoft.common.system.param;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Map;

/**
 * 系统设置更新参数
 * 用于处理包含配置字段的更新请求
 *
 * @author WebSoft
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
@Schema(description = "系统设置更新参数")
public class SettingUpdateParam {

    @Schema(description = "设置项标示")
    private String settingKey;

    @Schema(description = "设置内容（json格式）")
    private String content;

    @Schema(description = "排序号")
    private Integer sortNumber;

    @Schema(description = "备注")
    private String comments;

    @Schema(description = "租户id")
    private Integer tenantId;

    // 微信小程序配置字段
    @Schema(description = "微信小程序AppId")
    private String appId;

    @Schema(description = "微信小程序AppSecret")
    private String appSecret;

    // 支付配置字段
    @Schema(description = "商户号")
    private String mchId;

    @Schema(description = "API密钥")
    private String apiKey;

    @Schema(description = "微信支付API密钥")
    private String wechatApiKey;

    @Schema(description = "商户序列号")
    private String merchantSerialNumber;

    @Schema(description = "API客户端证书")
    private String apiclientCert;

    @Schema(description = "API客户端密钥")
    private String apiclientKey;

    // 短信配置字段
    @Schema(description = "短信AccessKey")
    private String accessKeyId;

    @Schema(description = "短信AccessSecret")
    private String accessKeySecret;

    @Schema(description = "短信签名")
    private String signName;

    @Schema(description = "短信模板")
    private String templateCode;

    // 企业微信配置字段
    @Schema(description = "企业ID")
    private String corpId;

    @Schema(description = "应用Secret")
    private String secret;

    // 微信公众号配置字段
    @Schema(description = "公众号Token")
    private String token;

    @Schema(description = "公众号EncodingAESKey")
    private String encodingAESKey;

    // 基本设置字段
    @Schema(description = "网站名称")
    private String siteName;

    @Schema(description = "网站Logo")
    private String logo;

    @Schema(description = "网站描述")
    private String description;

    @Schema(description = "网站关键词")
    private String keywords;

    // 上传配置字段
    @Schema(description = "存储桶名称")
    private String bucketName;

    @Schema(description = "存储桶域名")
    private String bucketDomain;

    @Schema(description = "存储桶端点")
    private String bucketEndpoint;

    // 打印机配置字段
    @Schema(description = "打印机设备号")
    private String deviceNo;

    @Schema(description = "打印机密钥")
    private String printerKey;

    /**
     * 获取其他未定义的字段
     * 用于处理动态配置字段
     */
    private Map<String, Object> additionalProperties;
}
