MESReport / utils /mes_player_acitivity_model.py
ChenyuRabbitLove's picture
refactor: move PlayerActivity auxiliary funtion to utils
62a652e
raw
history blame
632 Bytes
from datetime import datetime
class PlayerActivity():
def __init__() -> None:
self.player_backend_user_id = None
self.login_timestamp_tw = datetime.now()
self.rendered_timestamp_tw = None
def render_finished(self, player_backend_user_id):
self.player_backend_user_id = player_backend_user_id
self.rendered_timestamp_tw = datetime.now()
def to_dict(self):
return {
'player_backend_user_id': self.player_backend_user_id,
'login_timestamp_tw': self.login_timestamp_tw,
'rendered_timestamp_tw': self.rendered_timestamp_tw
}