<commit_before>from django.db import models

from zebra import mixins
from zebra.conf import settings


class DatesModelBase(models.Model):
    date_created = models.DateTimeField(auto_now_add=True)
    date_modified = models.DateTimeField(auto_now=True)
    
    class Meta:
        abstract = True


class StripeCustomer(models.Model, mixins.StripeCustomerMixin):
    customer_id = models.CharField(max_length=50)
    
    class Meta:
        abstract = True
    
    @property
    def stripe_customer_id(self):
        return self.subscription_id


class StripeSubscription(models.Model, mixins.StripeSubscriptionMixin):
    subscription_id = models.CharField(max_length=50)
    
    class Meta:
        abstract = True
    
    @property
    def stripe_subscription_id(self):
        return self.subscription_id
    

# Non abstract classes must be enabled in your project's settings.py
if settings.ZEBRA_ENABLE_APP:
    class Customer(DatesModelBase, StripeCustomer):
        pass
<commit_msg>adding subscription model<commit_after>from django.db import models

from zebra import mixins
from zebra.conf import settings


class DatesModelBase(models.Model):
    date_created = models.DateTimeField(auto_now_add=True)
    date_modified = models.DateTimeField(auto_now=True)
    
    class Meta:
        abstract = True


class StripeCustomer(models.Model, mixins.StripeCustomerMixin):
    customer_id = models.CharField(max_length=50)
    
    class Meta:
        abstract = True
    
    @property
    def stripe_customer_id(self):
        return self.subscription_id


class StripeSubscription(models.Model, mixins.StripeSubscriptionMixin):
    subscription_id = models.CharField(max_length=50)
    
    class Meta:
        abstract = True
    
    @property
    def stripe_subscription_id(self):
        return self.subscription_id
    

# Non abstract classes must be enabled in your project's settings.py
if settings.ZEBRA_ENABLE_APP:
    class Customer(DatesModelBase, StripeCustomer):
        pass
    
    class Subscription(DatesModelBase, StripeSubscription):
        pass

{'fraction_non_alphanumeric': 0.06519654841802493, 'fraction_numerical': 0.003835091083413231, 'mean_word_length': 3.4404255319148938, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '59241', 'n_tokens_mistral': 626, 'n_tokens_neox': 607, 'n_words': 138}