Beispiel #1
0
 def setUp(self):
     self.tm = TopModel.create('test_top')
     self.setup_top_model()
     self.redis = Redis(db=15)
Beispiel #2
0
file_name:user_property.py
"""
import time

from apps.models.level_user import LevelUser
from apps.models.virtual.user_level import UserLevel as UserLevelMod
from apps.models.virtual.card import Card as CardMod
from apps.models import data_log_mod
from apps.models.friend import Friend
from apps.common import utils
from django.conf import settings
from apps.oclib.model import TopModel
from apps.models.user_souls import UserSouls
from apps.models import GameModel

lv_top_model = TopModel.create(settings.LV_TOP)


class UserProperty(GameModel):
    """
    用户游戏内部基本信息
    """
    pk = 'uid'
    fields = [
        'uid', 'property_info', 'charge_award_info', 'consume_award_info'
    ]

    def __init__(self):
        """初始化用户游戏内部基本信息

        Args:
Beispiel #3
0
"""
import time

from apps.models.level_user import LevelUser
from apps.models.virtual.user_level import UserLevel as UserLevelMod
from apps.models.virtual.card import Card as CardMod
from apps.models import data_log_mod
from apps.models.friend import Friend
from apps.common import utils
from django.conf import settings
from apps.oclib.model import TopModel
from apps.models.user_souls import UserSouls
from apps.models import GameModel


lv_top_model = TopModel.create(settings.LV_TOP)


class UserProperty(GameModel):
    """
    用户游戏内部基本信息
    """
    pk = 'uid'
    fields = ['uid', 'property_info', 'charge_award_info', 'consume_award_info']
    def __init__(self):
        """初始化用户游戏内部基本信息

        Args:
            uid: 用户游戏ID
            data:游戏内部基本信息
        """