import { requestClient } from '#/api/request';
import type { UserInfo,AdminLog } from '#/model/admin.user';

export interface UserParam {
  uid: string;
}
export interface AdminLogParam {
  username?: string;
  page?: number;
  pageSize?: number;
  opration?: string;
}
export async function getAdminInfoApi(param: UserParam) {
  return requestClient.post<UserInfo>('/admin/info', param);
}

export async function getAdminListApi() {
  return requestClient.post<UserInfo[]>('/admin/list');
}

export async function getAdminLogListApi(param:AdminLogParam) {
  return requestClient.post<AdminLog[]>('/admin/log/list', param);
}


export async function addAdminApi(param: UserInfo) {
  return requestClient.post<UserInfo>('/admin/add', param);
}
