Skip to content
Snippets Groups Projects
Commit d5fc0c32 authored by Szenes Márton Miklós's avatar Szenes Márton Miklós
Browse files

Transaction table modified (added notes striong field)

parent 297aaa93
Branches
Tags
No related merge requests found
......@@ -89,12 +89,12 @@ class Transaction(db.Model):
# Mezők
id = db.Column(db.Integer, primary_key=True) # Automatikusan generált id
date = db.Column(db.DateTime(timezone=True), default=func.now()) # Tranzakció időbélyege
# date = db.Column(DateTime(timezone=True), default=lambda: datetime.now(timezone.utc))
by_user_uuid = db.Column(db.String(100), db.ForeignKey('users.uuid'), nullable=False) # Tranzakciót végrehajtó felhasználó id-je
to_user_uuid = db.Column(db.String(100), db.ForeignKey('users.uuid'), nullable=False) # Tranzakciót végrehajtó felhasználó id-je
item_id = db.Column(db.Integer, db.ForeignKey('items.id'), nullable=False) # Terméken id-je, amin végrehajtódott a tranzakció
amount = db.Column(db.Integer, nullable=False, default=1) # Tranzakció összege
quantity = db.Column(db.Integer, nullable=False, default=1) # Tranzakcióban szereplő termék vett darabszáma
note = db.Column(db.String(300), nullable=False, default="") # Tranzakció megjegyzés
# Kapcsolt mezők
by_user = db.relationship('User', foreign_keys=[by_user_uuid], back_populates="sent_transactions")
to_user = db.relationship('User', foreign_keys=[to_user_uuid], back_populates="received_transactions")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment