import { post } from '#/api/http'

import { BasicService } from '../basic'

class SpService extends BasicService {
  // 赠送乐贝
  async transferCoinToSchool(data: any) {
    return await post('/org/provider/trans/school', data)
  }

  async transferCoinToSp(data: any) {
    return await post('/org/provider/trans/provider', data)
  }

  protected findPageUrl(): string {
    return '/org/provider/list'
  }

  protected removeUrl(): string {
    return '/org/provider/batch/delete'
  }

  protected saveOrUpdateUrl(): string {
    return '/org/provider/saveOrUpdate'
  }

  protected override switchKeyValues() {
    return [
      {
        key: ['sellerFlag', 'buyerFlag', 'publicOrgFlag', 'enableReferral'],
        trueValue: 1,
        falseValue: 0,
      },
    ]
  }
}

export const spService = new SpService()
