package com.jeesharp.business.modules.pay.paychannelconfig.dto;

import com.jeesharp.framework.pojo.dto.BaseSaveDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 支付渠道公共配置保存请求 DTO。
 *
 * @author jeesharp
 * @since 2026-05-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "支付渠道公共配置保存请求")
public class PayChannelConfigSaveDTO extends BaseSaveDTO {

    @NotBlank(message = "渠道编码不能为空")
    @Schema(description = "渠道编码：WECHAT、ALIPAY、PFA、TLINX", requiredMode = Schema.RequiredMode.REQUIRED)
    private String channelCode;

    @Schema(description = "配置编码；新增时留空，服务端按「渠道编码_雪花ID」自动生成；编辑时只读回传")
    private String configCode;

    @Schema(description = "配置名称")
    private String configName;

    @Schema(description = "记录状态：0-禁用 1-启用")
    private Integer status;

    @Schema(description = "回调基地址")
    private String notifyBaseUrl;

    @Schema(description = "支付中心默认回调相对路径")
    private String payCenterNotifyPath;

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

    @Schema(description = "租户编码，平台默认为 1")
    private String tenantCode;

    @Schema(description = "租户 ID，留空表示平台默认")
    private String tenantId;
}
