14 lines
530 B
Python
14 lines
530 B
Python
from src.models.database_models.model import Model
|
|
from sqlalchemy import String
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
from uuid import UUID, uuid1
|
|
|
|
class AccountantSettings(Model):
|
|
__tablename__="accountant_settings"
|
|
|
|
id:Mapped[int]=mapped_column(primary_key=True, index=True)
|
|
name:Mapped[str]=mapped_column(String(64),unique=True, index=True)
|
|
database_key:Mapped[UUID]=mapped_column(default=uuid1, unique=True)
|
|
|
|
def __repr__(self) -> str:
|
|
return f'ID: {self.id}, Name: {self.name}' |