UNPKG

mxdocgen

Version:

A small tool that mimics the documentation generation capabilities offered in Mendix Studio Pro, but with greater flexibility. It uses the Mendix Model SDK to extract information from a Mendix model, which is then fed into a set of templates to generate

25 lines 922 B
"use strict"; exports.__esModule = true; var mendixmodelsdk_1 = require("mendixmodelsdk"); var AssociationType = mendixmodelsdk_1.domainmodels.AssociationType; var AssociationOwner = mendixmodelsdk_1.domainmodels.AssociationOwner; exports.multiplicity = function (association) { var type = association.type; var owner = association.owner; if (type === AssociationType.Reference && owner === AssociationOwner.Both) { return "One-to-one"; } else if (type === AssociationType.Reference && owner === AssociationOwner.Default) { return "One-to-many"; } else if (type === AssociationType.ReferenceSet && owner === AssociationOwner.Default) { return "Many-to-many"; } else if (type === AssociationType.ReferenceSet && owner === AssociationOwner.Both) { return "Many-to-many"; } else { return ""; } }; //# sourceMappingURL=associations.js.map