Spaces:
Runtime error
Runtime error
File size: 571 Bytes
99fdb5f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # models/models.py
from tortoise import fields
from tortoise.models import Model
class AdminUser(Model):
id = fields.IntField(pk=True)
username = fields.CharField(max_length=100, unique=True)
password = fields.CharField(max_length=200) # hashed later
class Meta:
table = "admin_users"
class UsageStat(Model):
id = fields.IntField(pk=True)
tool_name = fields.CharField(max_length=200)
usage_count = fields.IntField(default=0)
last_used_at = fields.DatetimeField(auto_now=True)
class Meta:
table = "usage_stats"
|