Exemple #1
0
def fetch_EnkiProductKey_by_activator_products_list(user_id, products_list):
    list = EnkiModelProductKey.query(
        ndb.AND(EnkiModelProductKey.activated_by_user == user_id,
                EnkiModelProductKey.product_name.IN(products_list))).fetch()
    return list
Exemple #2
0
def fetch_EnkiProductKey_by_activator(user_id):
    list = EnkiModelProductKey.query(
        EnkiModelProductKey.activated_by_user == user_id).order(
            EnkiModelProductKey.product_name).fetch()
    return list
Exemple #3
0
def exist_EnkiProductKey_product_activated_by(user_id, product_name):
    count = EnkiModelProductKey.query(
        ndb.AND(EnkiModelProductKey.activated_by_user == user_id,
                EnkiModelProductKey.product_name == product_name)).count(1)
    return count > 0
Exemple #4
0
def fetch_EnkiProductKey_by_purchaser(user_id):
    list = EnkiModelProductKey.query(
        EnkiModelProductKey.purchaser_user_id == user_id).order(
            EnkiModelProductKey.product_name).fetch()
    return list
Exemple #5
0
def get_EnkiProductKey_by_licence_key(licence_key):
    entity = EnkiModelProductKey.query(
        EnkiModelProductKey.licence_key == licence_key.replace('-', '')).get()
    return entity