auth unit tests & ruff visual fix
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
|
||||
class Base(BaseSettings):
|
||||
pass
|
||||
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
from src.models.database_models.model import Model
|
||||
from uuid import UUID, uuid1
|
||||
|
||||
from sqlalchemy import String
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
from uuid import UUID, uuid1
|
||||
|
||||
from src.models.database_models.model import Model
|
||||
|
||||
|
||||
class AccountantSettings(Model):
|
||||
__tablename__="accountant_settings"
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
from datetime import datetime
|
||||
from sqlalchemy import TIMESTAMP, String, func, ForeignKey
|
||||
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
||||
from src.models.database_models.model import Model
|
||||
from uuid import UUID, uuid1
|
||||
|
||||
from sqlalchemy import TIMESTAMP, ForeignKey, String, func
|
||||
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
||||
|
||||
from src.models.database_models.model import Model
|
||||
|
||||
|
||||
class Stored(Model):
|
||||
__tablename__="reports"
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
from decimal import Decimal
|
||||
from src.models.database_models.model import Model
|
||||
|
||||
from sqlalchemy import Boolean, ForeignKey, Integer, Numeric, String
|
||||
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
||||
|
||||
from src.models.database_models.model import Model
|
||||
|
||||
|
||||
class Nomenclature(Model):
|
||||
__tablename__="goods"
|
||||
|
||||
|
||||
@@ -1,7 +1,20 @@
|
||||
from sqlalchemy import TIMESTAMP, Table, create_engine, String, Boolean, MetaData, Column, ForeignKey, func, Uuid
|
||||
from sqlalchemy.orm import Mapped, mapped_column, DeclarativeBase, relationship
|
||||
from uuid import UUID, uuid4
|
||||
from datetime import datetime
|
||||
from uuid import UUID, uuid4
|
||||
|
||||
from sqlalchemy import (
|
||||
TIMESTAMP,
|
||||
Boolean,
|
||||
Column,
|
||||
ForeignKey,
|
||||
MetaData,
|
||||
String,
|
||||
Table,
|
||||
Uuid,
|
||||
create_engine,
|
||||
func,
|
||||
)
|
||||
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column, relationship
|
||||
|
||||
engine = create_engine("sqlite:///DB/database.db", echo=True)
|
||||
|
||||
'''remember as a boilerplate, or just cp/pst'''
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
from typing import Annotated
|
||||
from src.models.pydantic_models.model import Base
|
||||
from pydantic import Field
|
||||
from uuid import UUID
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
from src.models.pydantic_models.model import Base
|
||||
|
||||
|
||||
class AccountantCreate(Base):
|
||||
|
||||
name:Annotated[str, Field(...,max_length=64,description="name of the accountant setting")]
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
from datetime import datetime
|
||||
from typing import Annotated
|
||||
from uuid import UUID
|
||||
from src.models.pydantic_models.model import Base
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
from src.models.pydantic_models.model import Base
|
||||
|
||||
|
||||
class ReportCreate(Base):
|
||||
filename:Annotated[str,Field(..., min_length=2, max_length=255, description="name of the report")]
|
||||
doc_date:Annotated[datetime, Field(..., description="ts of the report")]
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
from decimal import Decimal
|
||||
from src.models.pydantic_models.model import Base
|
||||
from pydantic import Field
|
||||
from typing import Annotated
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
from src.models.pydantic_models.model import Base
|
||||
|
||||
|
||||
class NomenclatureCreate(Base):
|
||||
|
||||
article:Annotated[str, Field(...,min_length=5,max_length=16, description="name of the article")]
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
from datetime import datetime
|
||||
from typing import Annotated
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
from uuid import UUID
|
||||
|
||||
from pydantic import BaseModel, EmailStr, Field
|
||||
|
||||
|
||||
class Base(BaseModel):
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
Reference in New Issue
Block a user