agrs-sequelize-sdk 1.2.96 → 1.2.98

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/Article.js CHANGED
@@ -133,6 +133,26 @@ module.exports = (sequelize, DataTypes) => {
133
133
  type: DataTypes.STRING,
134
134
  allowNull: true,
135
135
  },
136
+ submittedToMine: {
137
+ type: DataTypes.BOOLEAN,
138
+ allowNull: true,
139
+ defaultValue: false,
140
+ comment: "Tracks if article has been submitted to Mine Marketing API in bulk migration"
141
+ },
142
+ submittedToMineAt: {
143
+ type: DataTypes.DATE,
144
+ allowNull: true,
145
+ comment: "Timestamp when article was submitted to Mine Marketing"
146
+ },
147
+ contentType: {
148
+ type: DataTypes.STRING,
149
+ allowNull: true,
150
+ defaultValue: 'generate',
151
+ validate: {
152
+ isIn: [['generate', 'import']]
153
+ },
154
+ comment: "Type of content: 'generate' for AI-generated or 'import' from URL"
155
+ }
136
156
  },
137
157
  {
138
158
  tableName: "articles",
@@ -81,12 +81,18 @@ module.exports = (sequelize, DataTypes) => {
81
81
  policy_status: {
82
82
  type: DataTypes.STRING,
83
83
  allowNull: true,
84
- comment: "Facebook policy status: APPROVED, DENIED, PENDING, etc."
84
+ comment: "Facebook policy status: APPROVED, DENIED, PENDING, etc.",
85
85
  },
86
86
  policy_rejection_reason: {
87
87
  type: DataTypes.TEXT,
88
88
  allowNull: true,
89
- comment: "Detailed reason for policy rejection"
89
+ comment: "Detailed reason for policy rejection",
90
+ },
91
+ first_spend_date: {
92
+ type: DataTypes.DATEONLY,
93
+ allowNull: true,
94
+ comment:
95
+ "First date when campaign had spend > 0 (for accurate days_running calculation)",
90
96
  },
91
97
  },
92
98
  {
@@ -95,6 +101,12 @@ module.exports = (sequelize, DataTypes) => {
95
101
  {
96
102
  fields: ["AdAccountID"], // Index on AdAccountID for faster joins
97
103
  },
104
+ {
105
+ fields: ["first_spend_date"], // Index for days_running calculations
106
+ },
107
+ {
108
+ fields: ["CampaignID", "first_spend_date"], // Composite index for performance queries
109
+ },
98
110
  ],
99
111
  }
100
112
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agrs-sequelize-sdk",
3
- "version": "1.2.96",
3
+ "version": "1.2.98",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "start": "node index.js",