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

import { BasicService } from '../basic'

class PropService extends BasicService {
  async changeStatus(data: any) {
    const url = '/propShop/changeStatus'
    const config = (await this.willUpdateSwitchKeyValues(url, data)) as any
    return await post(url, data, config)
  }

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

  protected removeUrl(): string {
    return '/propShop/delete'
  }

  protected override saveOrUpdateMultipart(): boolean {
    return true
  }

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

  protected override switchKeyValues() {
    return [
      {
        key: 'status',
        trueValue: 1,
        falseValue: 0,
      },
    ]
  }
}

export const propService = new PropService()
