import uuid from tortoise.models import Model from tortoise import fields class User(Model): id = fields.IntField(pk=True) clientId = fields.UUIDField(unique=True, default=uuid.uuid4) username = fields.CharField(max_length=100, unique=True) hashed_password = fields.CharField(max_length=255) email = fields.CharField(null=True, max_length=255) name = fields.CharField(null=True, max_length=255) firstname = fields.CharField(null=True, max_length=255) disabled = fields.BooleanField(default=False) class PydanticMeta: exclude = ['hashed_password'] class Meta: table = "users"