from django.db import models from django.conf import settings class BillingStripePaymentMethod(models.Model): user = models.ForeignKey( settings.AUTH_USER_MODEL, on_delete=models.DO_NOTHING, ) stripe_pm_id = models.CharField(max_length=255, unique=True) card_brand = models.CharField(max_length=50) last4 = models.CharField(max_length=4) exp_month = models.IntegerField() exp_year = models.IntegerField() created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) class Meta: db_table = "billing_stripe_payment_methods"