0.1.4 models update
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
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}'
|
||||
Reference in New Issue
Block a user