package com.mcwl.communityCenter.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.mcwl.common.core.domain.AjaxResult;
import com.mcwl.common.core.domain.R;
import com.mcwl.common.core.page.PageDomain;
import com.mcwl.common.core.page.TableDataInfo;
import com.mcwl.communityCenter.domain.Invite;
import com.mcwl.communityCenter.domain.Publish;
import com.mcwl.communityCenter.domain.vo.PublishVo;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

public interface InviteService extends IService<Invite> {

    /**
     * 获取邀请码
     * @param communityId 社区id
     * @return 邀请码
     */
    String getInviteCode(@NotNull(message = "communityId不能为空") Long communityId);

    /**
     * 接受邀请
     * @param communityId 社区id
     * @param inviteCode 邀请码
     * @return 结果
     */
    R<Object> acceptInvite(@NotNull(message = "communityId不能为空") Long communityId, @NotBlank(message = "inviteCode不能为空") String inviteCode);
}
