code: async function one2many (source, model, args = [], t) {
    let sourceId = `${this.name}Id`
    let previous = await this.models[model].findAll({
      where: {[sourceId]: source.id},
      transaction: t
    })
    let deletedIds = []
    let currentIds = args.map(i => i.id)
  
    previous.forEach(i => {
      if (!currentIds.includes(i.id)) {
        deletedIds.push(i.id)
      }
    })
    if (deletedIds.length !== 0) {
      await this.models[model].update({[sourceId]: null}, {
        where: {id: {[Op.in]: deletedIds}},
        transaction: t
      })
    }
  
    for (let arg of args) {
      if (!arg.hasOwnProperty(sourceId)) {
        arg[sourceId] = source.id
      }
    }
  
    await util.insertOrUpdate(this.models[model], args, t)
  }
docs: 查找相关的数据, 更新或者插入
  @param {object} source source model
  @param {string} model target model
  @param {object|array} args 要生成的参数
  @param {any} t 事务标志
  @return {Promise.<void>}
  @this model