package com.erp.tenant.service.customer;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.erp.tenant.entity.customer.Customer;

/**
 * 租户端客户服务接口
 */
public interface CustomerService {

    /**
     * 客户分页列表
     */
    IPage<Customer> getCustomerPage(Long tenantId, String keyword, String level,
                                     Integer status, int page, int pageSize);

    /**
     * 客户详情
     */
    Customer getCustomerDetail(Long tenantId, Long customerId);

    /**
     * 创建客户
     */
    Customer createCustomer(Long tenantId, Long operatorId, Customer customer);

    /**
     * 更新客户
     */
    boolean updateCustomer(Long tenantId, Long operatorId, Customer customer);

    /**
     * 删除客户
     */
    boolean deleteCustomer(Long tenantId, Long customerId);

    /**
     * 启用/禁用客户
     */
    boolean toggleCustomerStatus(Long tenantId, Long customerId, Integer status);

    /**
     * 客户统计
     */
    CustomerStats getCustomerStats(Long tenantId);

    class CustomerStats {
        public Long total;
        public Long active;
        public Long disabled;
    }
}
