trex-model 1.3.3__tar.gz → 1.3.4__tar.gz
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.
Potentially problematic release.
This version of trex-model might be problematic. Click here for more details.
- {trex-model-1.3.3/trex_model.egg-info → trex-model-1.3.4}/PKG-INFO +1 -1
- {trex-model-1.3.3 → trex-model-1.3.4}/setup.py +1 -1
- {trex-model-1.3.3 → trex-model-1.3.4/trex_model.egg-info}/PKG-INFO +1 -1
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/loyalty_models.py +3 -1
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/marketing_models.py +24 -2
- {trex-model-1.3.3 → trex-model-1.3.4}/LICENSE +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/MANIFEST.in +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/README.md +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/setup.cfg +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trex_model.egg-info/SOURCES.txt +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trex_model.egg-info/dependency_links.txt +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trex_model.egg-info/requires.txt +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trex_model.egg-info/top_level.txt +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/__init__.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/conf.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/__init__.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/__init__.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/admin_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/analytic_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/app_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/coporate_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/customer_model_helpers.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/customer_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/fb_subsriber_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/import_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/inventory_model.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/lucky_draw_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/membership_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/merchant_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/message_model_helper.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/message_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/model_decorators.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/ndb_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/pos_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/prepaid_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/product_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/program_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/rating_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/redeem_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/redemption_catalogue_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/reward_model_helpers.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/reward_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/spending_base_program_model.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/system_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/task_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/test_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/transaction_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/user_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/voucher_models.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/merchant_helpers.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/model_decorator.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/prepaid_helpers.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/pos_conf.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/program_conf.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/utils/__init__.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/utils/gcloud/__init__.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/utils/gcloud/datastore_util.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/utils/model/__init__.py +0 -0
- {trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/utils/model/model_util.py +0 -0
|
@@ -35,8 +35,10 @@ class LoyaltyDeviceSetting(BaseNModel,DictModel):
|
|
|
35
35
|
|
|
36
36
|
@property
|
|
37
37
|
def device_tokens_list(self):
|
|
38
|
+
_tokens_list = []
|
|
39
|
+
|
|
38
40
|
if self.device_details:
|
|
39
|
-
|
|
41
|
+
|
|
40
42
|
for k,v in self.device_details.items():
|
|
41
43
|
for dd in v:
|
|
42
44
|
_tokens_list.append(dd.get('device_token'))
|
|
@@ -138,11 +138,25 @@ class PushNotificationSetup(BaseNModel, DictModel):
|
|
|
138
138
|
return PushNotificationSetup.query(ndb.AND(PushNotificationSetup.is_archived==True), ancestor=merchant_acct.create_ndb_key()).fetch(limit=model_conf.MAX_FETCH_RECORD)
|
|
139
139
|
|
|
140
140
|
@staticmethod
|
|
141
|
-
def list(
|
|
141
|
+
def list(start_datetime=datetime.utcnow(), end_datetime=datetime.utcnow()):
|
|
142
142
|
result = PushNotificationSetup.query(
|
|
143
143
|
ndb.AND(
|
|
144
144
|
PushNotificationSetup.send==False,
|
|
145
|
-
PushNotificationSetup.schedule_datetime
|
|
145
|
+
PushNotificationSetup.schedule_datetime>start_datetime,
|
|
146
|
+
PushNotificationSetup.schedule_datetime<=end_datetime,
|
|
147
|
+
)
|
|
148
|
+
).fetch(offset=0, limit=conf.MAX_FETCH_RECORD)
|
|
149
|
+
return result
|
|
150
|
+
|
|
151
|
+
@staticmethod
|
|
152
|
+
def cound(start_datetime=datetime.utcnow(), end_datetime=datetime.utcnow()):
|
|
153
|
+
result = PushNotificationSetup.query(
|
|
154
|
+
ndb.AND(
|
|
155
|
+
PushNotificationSetup.send==False,
|
|
156
|
+
PushNotificationSetup.schedule_datetime>start_datetime,
|
|
157
|
+
PushNotificationSetup.schedule_datetime<=end_datetime,
|
|
158
|
+
)
|
|
159
|
+
).fetch(offset=0, limit=conf.MAX_FETCH_RECORD)
|
|
146
160
|
return result
|
|
147
161
|
|
|
148
162
|
class MarketingImage(BaseNModel, DictModel):
|
|
@@ -223,4 +237,12 @@ class ScheduledPushNotificationHistory(BaseNModel, DictModel):
|
|
|
223
237
|
ScheduledPushNotificationHistory.send==False,
|
|
224
238
|
ScheduledPushNotificationHistory.scheduled_datetime<=scheduled_datetime)).fetch(offset=0, limit=conf.MAX_FETCH_RECORD)
|
|
225
239
|
return result
|
|
240
|
+
|
|
241
|
+
@staticmethod
|
|
242
|
+
def count(scheduled_datetime=datetime.utcnow()):
|
|
243
|
+
return ScheduledPushNotificationHistory.query(
|
|
244
|
+
ndb.AND(
|
|
245
|
+
ScheduledPushNotificationHistory.send==False,
|
|
246
|
+
ScheduledPushNotificationHistory.scheduled_datetime<=scheduled_datetime)).count(limit=conf.MAX_FETCH_RECORD)
|
|
247
|
+
|
|
226
248
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/redemption_catalogue_models.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trex-model-1.3.3 → trex-model-1.3.4}/trexmodel/models/datastore/spending_base_program_model.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|