芝麻web文件管理V1.00
编辑当前文件:/home/freeclou/app.optimyar.com/backend/node_modules/strapi-utils/lib/relations.js
'use strict'; const { prop } = require('lodash/fp'); const MANY_RELATIONS = ['oneToMany', 'manyToMany', 'manyWay']; const RF_RELATIONS = ['oneToMany', 'manyToMany', 'manyWay', 'manyToOne', 'oneWay', 'oneToOne']; const getRelationalFields = modelDef => { return modelDef.associations.filter(a => RF_RELATIONS.includes(a.nature)).map(prop('alias')); }; module.exports = { getRelationalFields, constants: { MANY_RELATIONS, }, };