package com.ai.da.service;

import com.ai.da.common.response.PageBaseResponse;
import com.ai.da.mapper.primary.entity.Affiliate;
import com.ai.da.model.dto.AffiliateQueryDTO;
import com.ai.da.model.vo.AffiliateInvitationDetailsVO;
import com.ai.da.model.vo.AffiliateVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

public interface AffiliateService extends IService<Affiliate> {

    Boolean registerAsAnAffiliate(String promotionMethod);

    PageBaseResponse<AffiliateVO> getAffiliateList(AffiliateQueryDTO affiliateQueryDTO);

    AffiliateVO personalAffiliateCenter();

    double[] getPersonalMonthlyIncome(int year);

    Boolean applicationApproval(Long id, Boolean isApproved, Float commission);

    void updateCommissionPercentage(Long id, Float commission);

    void updateAffiliateInfoWithPayment();

    Boolean affiliateLinkViewsIncrease(Long id);

    IPage<AffiliateInvitationDetailsVO> getEachAffiliateGeneratedRevenue(AffiliateQueryDTO affiliateQueryDTO);

    Affiliate getByAccountId(Long accountId);

    void commissionCalculation(Integer year, Integer month);

    void calcCouponsCommission();
}
