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.Authorization;
import com.fkzy.warn.model.User;

/**
 * @author zhangjing
 * @date 2023/10/16 18:17
 * @description
 */
public interface AuthorizationService extends IService<Authorization> {

    /**
     * 保存
     * @param entity
     * @return
     */
    ApiResponse saveModel(Authorization entity,String ticket);

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

    /**
     * 删除
     * @param entity
     * @return
     */
    boolean deleteModel(Authorization entity);

    /**
     * 分页查询
     * @param parameter
     * @return
     */
    Page<User> queryPage(RequestParameter parameter);

    /**
     * 申请
     * @param jsonObject
     * @return
     */
    ApiResponse applyFor(JSONObject jsonObject , String ticket);

    /**
     * 审批
     * @param jsonObject
     * @return
     */
    ApiResponse approve(JSONObject jsonObject , String ticket);

}
