import request from "@/utils/request";
import { Account_BaseUrl } from "@/api/config";
const baseURL = Account_BaseUrl + "/admin/activate";
const API = {

  getList() {
    return request({
      url: `${baseURL}`,
      method: "get",
    });
  },
  edit(data: editRequest) {
    return request({
      url: `${baseURL}`,
      method: "put",
      data: data,
    });
  },
  add(data: addRequest) {
    return request({
      url: `${baseURL}`,
      method: "post",
      data: data,
    });
  }
}
export default API;

export interface addRequest {
  /**
   * 充值金额
   */
  amount?: number;
  /**
   * 优惠卷id
   */
  couponId?: number;
  /**
   * 赠送金额
   */
  giftAmount?: number;
  /**
   * 赠送积分
   */
  giftPoints?: number;
  /**
   * 是否赠送优惠卷 0否 1是
   */
  isGiftCoupon?: number;
  /**
   * 优惠卷数量
   */
  num?: number;
  [property: string]: any;
}

export interface editRequest {
  /**
   * 充值金额
   */
  amount: number;
  /**
   * 优惠卷id
   */
  couponId?: number;
  /**
   * 赠送金额
   */
  giftAmount?: number;
  /**
   * 赠送积分
   */
  giftPoints?: number;
  id: number;
  /**
   * 是否赠送优惠卷 0否 1是
   */
  isGiftCoupon?: number;
  /**
   * 优惠卷数量
   */
  num?: number;
  shopId?: number;
  [property: string]: any;
}