import { responsesmodel } from './model/queryModal';
import { defHttp } from '@/utils/http/axios';

enum Api {
  LoadSysImMsgList = '/api/ImMsg/LoadSysImMsgList',
  VirtualDeleteEntitys = '/api/ImMsg/VirtualDeleteEntitys',
  DeleteEntitys = '/api/ImMsg/DeleteEntitys',
  ReadMsg = '/api/ImMsg/ReadMsg',
  GetLastList = '/api/ImMsg/GetLastList',
  GetInfoByContentId = '/api/ImMsg/GetInfoByContentId',
}

export function loadSysImMsgList(params) {
  return defHttp.get<responsesmodel>({
    url: Api.LoadSysImMsgList,
    params,
  });
}
export function virtualDeleteEntitys(params) {
  return defHttp.post({
    url: Api.VirtualDeleteEntitys,
    params,
  });
}
export function deleteEntitys(params) {
  return defHttp.post({
    url: Api.DeleteEntitys,
    params,
  });
}
export function readMsg(params) {
  return defHttp.post({
    url: Api.ReadMsg + '?id=' + params.id,
  });
}
export function getLastList(params) {
  return defHttp.get({
    url: Api.GetLastList + '?userId=' + params.userId,
  });
}

export function getInfoByContentId(params) {
  return defHttp.get({
    url: Api.GetInfoByContentId + '?contentid=' + params.id,
  });
}
