import { addUser, delUser, page, updateUser } from '@/api/user'
import { message } from 'ant-design-vue'

export class UserController {
  static async page (queryState: USER.Params.Query) {
    return await page(queryState)
  }

  static async del (id: string) {
    await delUser(id)
    message.success('删除成功')
  }

  static async add (data: USER.User.Detail) {
    await addUser(data)
    message.success('添加成功')
  }

  static async update (data: USER.User.Detail) {
    await updateUser(data)
    message.success('修改成功')
  }
}
