package com.fkzy.warn.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fkzy.warn.common.request.RequestParameter;
import com.fkzy.warn.common.response.ApiResponse;
import com.fkzy.warn.model.User;

/**
 * @author zhangjing
 * @date 2024/12/04 14:49
 * @description
 */
public interface UserService extends IService<User> {




    /**
     *
     * 登录
     * @param jsonObject
     * @return response.common.com.fkzy.warn.ApiResponse
     * @author zhangjing
     * @create 2024/12/4
     **/
    ApiResponse sendCode(JSONObject jsonObject);
    /**
     *
     * 登录
     * @param jsonObject
     * @return response.common.com.fkzy.warn.ApiResponse
     * @author zhangjing
     * @create 2024/12/4
     **/
    ApiResponse login(JSONObject jsonObject);

    /**
     *
     * 创建用户
     * @param entity
     * @return response.common.com.fkzy.warn.ApiResponse
     * @author zhangjing
     * @create 2024/12/4
     **/
    ApiResponse createUser(User entity,String ticket);

    /**
     * 保存
     * @param entity
     * @return
     */
    boolean saveModel(User entity);

    /**
     * 修改
     * @param entity
     * @return
     */
    boolean updateModel(User entity);

    /**
     * 删除
     * @param entity
     * @return
     */
    boolean deleteModel(User entity);
    /**
     * 分页查询
     * @param parameter
     * @return
     */
    Page<User> queryPage(RequestParameter parameter);

    /**
     * 获取人员企业，身份
     *
     * @param
     * @return
     */
    User getUserByTicket(String ticket);

    /**
     *
     * 创建试用用户
     * @param entity
     * @return response.common.com.fkzy.warn.ApiResponse
     * @author zhangjing
     * @create 2024/12/4
     **/
    ApiResponse createTrial(User entity,String ticket);

    /**
     * 试用分页
     * @param parameter
     * @return
     */
    Page<User> queryPageTrial(RequestParameter parameter);

    /**
     *
     * 配置试用账号
     * @param entity
     * @return response.common.com.fkzy.warn.ApiResponse
     * @author zhangjing
     * @create 2024/12/4
     **/
    ApiResponse setTrial(User entity,String ticket);
}
