agrs-sequelize-sdk 1.0.49 → 1.0.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/models/Files.js +0 -13
- package/package.json +1 -1
package/models/Files.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
module.exports = (sequelize, DataTypes) => {
|
|
3
2
|
const Files = sequelize.define("Files", {
|
|
4
3
|
id: {
|
|
@@ -48,17 +47,5 @@ module.exports = (sequelize, DataTypes) => {
|
|
|
48
47
|
},
|
|
49
48
|
});
|
|
50
49
|
|
|
51
|
-
Files.associate = function (models) {
|
|
52
|
-
// Optional relationship: Each file may belong to a folder (ParentFolder), but it can be null
|
|
53
|
-
/*Files.belongsTo(models.Folders, {
|
|
54
|
-
foreignKey: "ParentFolders",
|
|
55
|
-
targetKey: "id",
|
|
56
|
-
allowNull: true,
|
|
57
|
-
});*/
|
|
58
|
-
|
|
59
|
-
// Each file belongs to an AdCreative (assuming this is a separate model)
|
|
60
|
-
Files.belongsTo(models.AdCreative, { foreignKey: "id", targetKey: "id" });
|
|
61
|
-
};
|
|
62
|
-
|
|
63
50
|
return Files;
|
|
64
51
|
};
|