import request from '@/config/axios'

// 代理租户套餐 VO
export interface TenantAgencyPackageVO {
  id: number // 套餐编号
  name: string // 套餐名
  status: number // 租户状态（0正常 1停用）
  remark: string // 备注
  menuIds: string // 关联的菜单编号
  days: number // 套餐天数
  price: number // 套餐价格
  hostslClient: number // 爬主播客户端 0 关闭 1 开启
  brotherClient: number // 爬大哥客户端 0 关闭 1 开启
  aiClient: number // AI 客户端 0 关闭 1 开启
  packageType: number // 套餐类型
}

// 代理租户套餐 API
export const TenantAgencyPackageApi = {
  // 查询代理租户套餐分页
  getTenantAgencyPackagePage: async (params: any) => {
    return await request.get({ url: `/system/tenant-agency-package/page`, params })
  },

  // 查询代理租户套餐详情
  getTenantAgencyPackage: async (id: number) => {
    return await request.get({ url: `/system/tenant-agency-package/get?id=` + id })
  },

  // 新增代理租户套餐
  createTenantAgencyPackage: async (data: TenantAgencyPackageVO) => {
    return await request.post({ url: `/system/tenant-agency-package/create`, data })
  },

  // 修改代理租户套餐
  updateTenantAgencyPackage: async (data: TenantAgencyPackageVO) => {
    return await request.put({ url: `/system/tenant-agency-package/update`, data })
  },

  // 删除代理租户套餐
  deleteTenantAgencyPackage: async (id: number) => {
    return await request.delete({ url: `/system/tenant-agency-package/delete?id=` + id })
  },

  // 导出代理租户套餐 Excel
  exportTenantAgencyPackage: async (params) => {
    return await request.download({ url: `/system/tenant-agency-package/export-excel`, params })
  }
}