from sqlmodel import SQLModel, Field
import uuid as uuid_pkg
from typing import Optional


class FilesBase(SQLModel):
    name: str


class Files(FilesBase, table=True):
    id: int = Field(default=None, primary_key=True)
    uuid: uuid_pkg.UUID = Field(
        default_factory=uuid_pkg.uuid4,
        index=True,
        nullable=False,
    )
    count_download: int = Field(default=0)


class FilesCreate(FilesBase):
    pass

sqlmodel.Field
[((184, 221), 'sqlmodel.Field', 'Field', ([], {'default': 'None', 'primary_key': '(True)'}), '(default=None, primary_key=True)\n', (189, 221), False, 'from sqlmodel import SQLModel, Field\n'), ((248, 313), 'sqlmodel.Field', 'Field', ([], {'default_factory': 'uuid_pkg.uuid4', 'index': '(True)', 'nullable': '(False)'}), '(default_factory=uuid_pkg.uuid4, index=True, nullable=False)\n', (253, 313), False, 'from sqlmodel import SQLModel, Field\n'), ((371, 387), 'sqlmodel.Field', 'Field', ([], {'default': '(0)'}), '(default=0)\n', (376, 387), False, 'from sqlmodel import SQLModel, Field\n')]