Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/beximco/proxy_server-master/node_modules/sequelize/lib/associations/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
const { AssociationError } = require("./../errors");
class Association {
constructor(source, target, options = {}) {
this.source = source;
this.target = target;
this.options = options;
this.scope = options.scope;
this.isSelfAssociation = this.source === this.target;
this.as = options.as;
this.associationType = "";
if (source.hasAlias(options.as)) {
throw new AssociationError(`You have used the alias ${options.as} in two separate associations. Aliased associations must have unique aliases.`);
}
}
toInstanceArray(input) {
if (!Array.isArray(input)) {
input = [input];
}
return input.map((element) => {
if (element instanceof this.target)
return element;
const tmpInstance = {};
tmpInstance[this.target.primaryKeyAttribute] = element;
return this.target.build(tmpInstance, { isNewRecord: false });
});
}
[Symbol.for("nodejs.util.inspect.custom")]() {
return this.as;
}
}
module.exports = Association;
//# sourceMappingURL=base.js.map
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0391 ]-- |