0ptr/nullptr/models/agent.py

20 lines
341 B
Python

from .base import Base
class Agent(Base):
def define(self):
self.token: str = None
self.credits: int = 0
def update(self, d):
self.seta('credits', d)
@classmethod
def ext(self):
return 'agt'
def f(self, detail=1):
r = super().f(detail)
if detail >2:
r += f' c:{self.credits}'
return r