package org.agt.module.system.api.mail;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import org.agt.framework.common.pojo.CommonResult;
import org.agt.module.system.api.mail.dto.MailTemplateSaveReqDTO;
import org.agt.module.system.enums.ApiConstants;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = ApiConstants.NAME) // TODO 芋艿：fallbackFactory =
@Tag(name = "RPC 服务 - 邮件")
public interface MailTemplateApi {

    String PREFIX = ApiConstants.PREFIX + "/mail/template";

    @PostMapping(PREFIX + "/update-template")
    @Operation(summary = "更新单条邮件模板", description = "在 mail 为空时，使用 userId 加载对应 Admin 的邮箱")
    CommonResult<Boolean> updateMailTemplate(@Valid @RequestBody MailTemplateSaveReqDTO reqDTO);

}
