trex-model 1.3.5__tar.gz → 1.3.7__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.5/trex_model.egg-info → trex-model-1.3.7}/PKG-INFO +1 -1
- {trex-model-1.3.5 → trex-model-1.3.7}/setup.py +1 -1
- {trex-model-1.3.5 → trex-model-1.3.7/trex_model.egg-info}/PKG-INFO +1 -1
- {trex-model-1.3.5 → trex-model-1.3.7}/trex_model.egg-info/SOURCES.txt +1 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/customer_model_helpers.py +7 -2
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/customer_models.py +2 -0
- trex-model-1.3.7/trexmodel/models/datastore/recruit_models.py +47 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/LICENSE +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/MANIFEST.in +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/README.md +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/setup.cfg +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trex_model.egg-info/dependency_links.txt +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trex_model.egg-info/requires.txt +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trex_model.egg-info/top_level.txt +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/__init__.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/conf.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/__init__.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/__init__.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/admin_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/analytic_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/app_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/coporate_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/fb_subsriber_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/import_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/inventory_model.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/loyalty_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/lucky_draw_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/marketing_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/membership_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/merchant_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/message_model_helper.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/message_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/model_decorators.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/ndb_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/pos_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/prepaid_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/product_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/program_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/rating_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/redeem_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/redemption_catalogue_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/reward_model_helpers.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/reward_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/spending_base_program_model.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/system_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/task_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/test_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/transaction_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/user_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/datastore/voucher_models.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/merchant_helpers.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/model_decorator.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/models/prepaid_helpers.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/pos_conf.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/program_conf.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/utils/__init__.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/utils/gcloud/__init__.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/utils/gcloud/datastore_util.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/utils/model/__init__.py +0 -0
- {trex-model-1.3.5 → trex-model-1.3.7}/trexmodel/utils/model/model_util.py +0 -0
|
@@ -40,6 +40,7 @@ trexmodel/models/datastore/prepaid_models.py
|
|
|
40
40
|
trexmodel/models/datastore/product_models.py
|
|
41
41
|
trexmodel/models/datastore/program_models.py
|
|
42
42
|
trexmodel/models/datastore/rating_models.py
|
|
43
|
+
trexmodel/models/datastore/recruit_models.py
|
|
43
44
|
trexmodel/models/datastore/redeem_models.py
|
|
44
45
|
trexmodel/models/datastore/redemption_catalogue_models.py
|
|
45
46
|
trexmodel/models/datastore/reward_model_helpers.py
|
|
@@ -186,14 +186,19 @@ def update_customer_entiteld_voucher_summary_with_new_voucher_info(customer_enti
|
|
|
186
186
|
voucher_summary = customer_entitled_voucher_summary.get(merchant_voucher_key)
|
|
187
187
|
latest_expiry_date_str = None
|
|
188
188
|
if redeem_info_list and len(redeem_info_list)>0:
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
|
|
190
|
+
latest_expiry_date = get_latest_expiry_date(redeem_info_list)
|
|
191
|
+
latest_expiry_date_str = datetime.strftime(latest_expiry_date, '%d-%m-%Y')
|
|
192
|
+
|
|
193
|
+
logger.debug('New entitled voucher latest_expiry_date_str=%s', latest_expiry_date_str)
|
|
191
194
|
|
|
192
195
|
if voucher_summary:
|
|
196
|
+
logger.debug('Found voucher summary, thus going to add new redeem info')
|
|
193
197
|
customer_entitled_voucher_summary[merchant_voucher_key]['redeem_info_list'].extend(redeem_info_list)
|
|
194
198
|
customer_entitled_voucher_summary[merchant_voucher_key]['amount'] = len(customer_entitled_voucher_summary[merchant_voucher_key]['redeem_info_list'])
|
|
195
199
|
|
|
196
200
|
else:
|
|
201
|
+
logger.debug('Not found voucher summary, thus going to create it')
|
|
197
202
|
voucher_summary = {
|
|
198
203
|
'key' : merchant_voucher_key,
|
|
199
204
|
'label' : voucher_label,
|
|
@@ -242,7 +242,9 @@ class Customer(BaseNModel, DictModel, FullTextSearchable):
|
|
|
242
242
|
|
|
243
243
|
@staticmethod
|
|
244
244
|
def remove_ticket_from_lucky_draw_ticket_summary(customer_acct, removed_draw_ticket):
|
|
245
|
+
logger.debug('removed_draw_ticket=%s', removed_draw_ticket)
|
|
245
246
|
entitled_lucky_draw_ticket_summary = {}
|
|
247
|
+
|
|
246
248
|
if customer_acct.entitled_lucky_draw_ticket_summary:
|
|
247
249
|
entitled_lucky_draw_ticket_summary = customer_acct.entitled_lucky_draw_ticket_summary
|
|
248
250
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'''
|
|
2
|
+
Created on 27 Mar 2024
|
|
3
|
+
|
|
4
|
+
@author: jacklok
|
|
5
|
+
'''
|
|
6
|
+
|
|
7
|
+
from trexmodel.models.datastore.ndb_models import BaseNModel, DictModel
|
|
8
|
+
from google.cloud import ndb
|
|
9
|
+
from trexmodel.models.datastore.merchant_models import MerchantAcct, Outlet
|
|
10
|
+
from trexmodel.models.datastore.user_models import User
|
|
11
|
+
from trexmodel import conf
|
|
12
|
+
from datetime import datetime, timedelta
|
|
13
|
+
import logging
|
|
14
|
+
from builtins import staticmethod
|
|
15
|
+
|
|
16
|
+
logger = logging.getLogger('model')
|
|
17
|
+
|
|
18
|
+
class RecruitBase(BaseNModel, DictModel):
|
|
19
|
+
name = ndb.StringProperty(required=True)
|
|
20
|
+
mobile_phone = ndb.StringProperty(required=True)
|
|
21
|
+
email = ndb.StringProperty(required=True)
|
|
22
|
+
address = ndb.TextProperty(required=False)
|
|
23
|
+
submitted_datetime = ndb.DateTimeProperty(required=True, auto_now=True)
|
|
24
|
+
|
|
25
|
+
class CoFounderRecruit(RecruitBase):
|
|
26
|
+
involved_in_founding = ndb.BooleanProperty(required=True)
|
|
27
|
+
founding_details = ndb.TextProperty(required=False)
|
|
28
|
+
employment_time = ndb.TextProperty(required=True)
|
|
29
|
+
skill = ndb.TextProperty(required=True)
|
|
30
|
+
linkedin_profile = ndb.TextProperty(required=True)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
@staticmethod
|
|
34
|
+
def create(name=None, mobile_phone=None, email=None, address=None, involved_in_founding=False,
|
|
35
|
+
founding_details=None, employment_time=None, skill=None, linkedin_profile=None):
|
|
36
|
+
CoFounderRecruit(
|
|
37
|
+
name = name,
|
|
38
|
+
mobile_phone = mobile_phone,
|
|
39
|
+
email = email,
|
|
40
|
+
address = address,
|
|
41
|
+
involved_in_founding = involved_in_founding,
|
|
42
|
+
founding_details = founding_details,
|
|
43
|
+
employment_time = employment_time,
|
|
44
|
+
skill = skill,
|
|
45
|
+
linkedin_profile = linkedin_profile,
|
|
46
|
+
).put()
|
|
47
|
+
|
|
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.5 → trex-model-1.3.7}/trexmodel/models/datastore/redemption_catalogue_models.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trex-model-1.3.5 → trex-model-1.3.7}/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
|