package shop.alien.entity.store.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.io.Serializable;

/**
 * 关注/取消关注的业务执行结果（含明确提示文案）。
 */
@Getter
@AllArgsConstructor(access = AccessLevel.PRIVATE)
@ApiModel(description = "关注操作结果")
public class LifeFansFollowOutcome implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "是否视为成功（含幂等已成功）")
    private final boolean ok;

    @ApiModelProperty(value = "展示给前端/用户的说明")
    private final String message;

    public static LifeFansFollowOutcome success(String message) {
        return new LifeFansFollowOutcome(true, message);
    }

    public static LifeFansFollowOutcome failure(String message) {
        return new LifeFansFollowOutcome(false, message);
    }
}
