package com.rj.dto;

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

import java.time.LocalDateTime;

/**
 * 更新 {@code lb_third_integration_config} 凭证列的请求体。
 */
@Data
@Schema(description = "租户第三方集成凭证更新请求")
public class LbThirdIntegrationCredentialUpdateRequest {

    @Schema(description = "完整 Cookie 明文，如 PHPSID=xxxx；与 clearCookie 互斥")
    private String cookie;

    @Schema(description = "PHPSID 值明文（不含 PHPSID= 前缀）；与 clearPhpsid 互斥")
    private String phpsid;

    @Schema(description = "货品/抢购 token 明文；与 clearGoodsApiToken 互斥")
    private String goodsApiToken;

    @Schema(description = "签名密钥 appStr 明文；与 clearGoodsApiAppStr 互斥")
    private String goodsApiAppStr;

    @Schema(description = "凭证预计过期时间（可选）")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime credentialExpireTime;

    @Schema(description = "操作人（可选，写入 updated_by）")
    private String updatedBy;

    @Schema(description = "为 true 时清除 cookie")
    private Boolean clearCookie;

    @Schema(description = "为 true 时清除 phpsid")
    private Boolean clearPhpsid;

    @Schema(description = "为 true 时清除 goods_api_token")
    private Boolean clearGoodsApiToken;

    @Schema(description = "为 true 时清除 goods_api_app_str")
    private Boolean clearGoodsApiAppStr;
}
