package com.cf.imes.module.system.api.advertisement;

import com.cf.imes.module.system.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = ApiConstants.NAME) // TODO 晨丰：fallbackFactory =
@Tag(name = "RPC 服务 - 广告管理")
public interface AdvertisementApi {

    String PREFIX = ApiConstants.PREFIX + "/ad";

    @GetMapping(PREFIX + "/published")
    @Operation(summary = "结束发布广告")
    @Parameter(name = "id", description = "广告id", required = true)
    Boolean published(@RequestParam("id") Long id) ;

    @GetMapping(PREFIX + "/publishing")
    @Operation(summary = "立即发布广告")
    @Parameter(name = "id", description = "广告id", required = true)
    Boolean publishing(@RequestParam("id") Long id) ;
}
