Initial commit.

This commit is contained in:
Yaro Kasear 2025-06-11 09:10:41 -05:00
commit 189f73b7c2
34 changed files with 1064 additions and 0 deletions

19
models/brands.py Normal file
View file

@ -0,0 +1,19 @@
from typing import List, Optional, TYPE_CHECKING
if TYPE_CHECKING:
from .inventory import Inventory
from sqlalchemy import Identity, Integer, Unicode
from sqlalchemy.orm import Mapped, mapped_column, relationship
from . import db
class Brand(db.Model):
__tablename__ = 'Brands'
id: Mapped[int] = mapped_column("ID", Integer, Identity(start=1, increment=1), primary_key=True)
name: Mapped[Optional[str]] = mapped_column("Brand", Unicode(255), nullable=True)
inventory: Mapped[List['Inventory']] = relationship('Inventory', back_populates='brand')
def __repr__(self):
return f"<Brand(id={self.id}, name={repr(self.name)})>"