async getUserInvitation (uid = -1, page = 1, size = 20) {
    let result = db('invitations')
    if (uid !== -1) result = result.where('creator', uid)
    result = await result.orderBy('id', 'desc').select('*').paginate({
      perPage: size,
      currentPage: page
    })

    if (!result.data) {
      return {
        total: 0,
        data: []
      }
    }

    let total = db('invitations')
    if (uid !== -1) total = total.where('creator', uid)
    total = (await total.count())[0]['count(*)']

    return {
      total,
      data: result.data
    }
  }
Get user invitation list

@param {Int=} uid user id
@param {Int=} page page number
@param {Int=} size page size

@returns {Array} invitation list