feat: Added price updating
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from datetime import datetime
|
||||
|
||||
from sqlalchemy import DateTime, ForeignKey, Integer, String
|
||||
from sqlalchemy import DateTime, Float, ForeignKey, Integer, String
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from .db import Base
|
||||
@@ -11,7 +11,7 @@ class Drink(Base):
|
||||
|
||||
id: Mapped[int] = mapped_column(Integer, primary_key=True)
|
||||
name: Mapped[str] = mapped_column(String)
|
||||
price: Mapped[int] = mapped_column(Integer)
|
||||
price: Mapped[float] = mapped_column(Integer)
|
||||
stock: Mapped[int] = mapped_column(Integer)
|
||||
stocked_by: Mapped[str] = mapped_column(String)
|
||||
|
||||
@@ -24,4 +24,5 @@ class Transaction(Base):
|
||||
drink: Mapped[int] = mapped_column(Integer, ForeignKey(Drink.id))
|
||||
user_name: Mapped[str] = mapped_column(String)
|
||||
quantity: Mapped[int] = mapped_column(Integer)
|
||||
cost: Mapped[float] = mapped_column(Float)
|
||||
timestamp: Mapped[datetime] = mapped_column(DateTime)
|
||||
|
||||
Reference in New Issue
Block a user