from django import forms

from engine.core.widgets import JSONTableWidget
from engine.payments.models import Gateway, Transaction


class TransactionForm(forms.ModelForm):
    class Meta:
        model = Transaction
        fields = "__all__"
        widgets = {
            "process": JSONTableWidget(),
        }


class GatewayForm(forms.ModelForm):
    class Meta:
        model = Gateway
        fields = "__all__"
        widgets = {
            "integration_variables": JSONTableWidget(),
        }
