Skip to content

Commit

Permalink
Create schemas.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Aug 3, 2024
1 parent 2763108 commit 9f27d82
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# payment_gateway/schemas.py
from. import ma
from.models import User, PaymentMethod, Transaction

class UserSchema(ma.SQLAlchemyAutoSchema):
class Meta:
model = User
load_instance = True
exclude = ("password",)

class PaymentMethodSchema(ma.SQLAlchemyAutoSchema):
class Meta:
model = PaymentMethod
load_instance = True
exclude = ("payment_method_token",)

class TransactionSchema(ma.SQLAlchemyAutoSchema):
class Meta:
model = Transaction
load_instance = True

0 comments on commit 9f27d82

Please sign in to comment.