import request from "@/utils/request";
import { Account_BaseUrl } from "@/api/config";
const baseURL = Account_BaseUrl + "/admin/shopArea";
const ShopStaffApi = {
  getList(params: getListRequest) {
    return request<any>({
      url: `${baseURL}`,
      method: "get",
      params
    });
  },
  add(data: addRequest) {
    return request<any>({
      url: `${baseURL}`,
      method: "post",
      data
    });
  },
  edit(data: editRequest) {
    return request<any>({
      url: `${baseURL}`,
      method: "put",
      data
    });
  },
  delete(id: string | number) {
    return request<any>({
      url: `${baseURL}`,
      method: "delete",
      data: { id }
    });
  },
};

export default ShopStaffApi;

export interface getListRequest {
  /**
   * 区域名称
   */
  name?: string;
  page?: string;
  size?: string;
  [property: string]: any;
}
/**
 * ShopAreaEditDTO
 */
export interface editRequest {
  /**
   * id
   */
  id: number | null;
  /**
   * 区域名称
   */
  name?: null | string;
  /**
   * 排序
   */
  sort?: number | null;
  [property: string]: any;
}

/**
 * ShopAreaAddDTO
 */
export interface addRequest {
  /**
   * 区域名称
   */
  name: null | string;
  /**
   * 排序
   */
  sort?: number | null;
  [property: string]: any;
}