import request from "@/utils/httpRequest";
import { PUBLIC_MODULES_PATH as prefix } from "@/api/AppPath";

export default class LuckyDrawEventsService {
  list (params) {
    return request({
      url: prefix + '/luckyDraw/events/list',
      method: 'get',
      params: params
    })
  }
  save (param) {
    return request({
      url: prefix + '/luckyDraw/events/save',
      method: 'post',
      data: param
    })
  }
  queryById (id) {
    return request({
      url: prefix + '/luckyDraw/events/queryById',
      method: 'get',
      params: {id: id}
    })
  }
  delete (ids) {
    return request({
      url: prefix + '/luckyDraw/events/delete',
      method: 'delete',
      params: {ids: ids}
    })
  }
  openEvent (id) {
    return request({
      url: prefix + '/luckyDraw/events/openEvent',
      method: 'get',
      params: {id: id}
    })
  }
  closeEvent (id) {
    return request({
      url: prefix + '/luckyDraw/events/closeEvent',
      method: 'get',
      params: {id: id}
    })
  }
}
