from django.db import models

from authentication.models import User

# Create your models here.
class Transactions(models.Model):
    id : models.AutoField(primary_key=True)
    user = models.ForeignKey(User, blank=False, null=True, on_delete=models.SET_NULL)
    razorpay_order_id  = models.CharField(max_length=255, blank=False, null= False) 
    razorpay_payment_id  = models.CharField(max_length=255, blank=False, null= False) 
    razorpay_signature  = models.CharField(max_length=255, blank=False, null= False) 
    created_at = models.DateTimeField(auto_now_add= True)
    updated_at = models.DateTimeField(auto_now_add= True)

    class Meta:
        managed = False
        db_table = 'transactions_transactions'